anchor.diff:                      (eventProc, false)
                   else if (isClosed()) then
                       Logger.LogF( LogLevel.MildVerbose, (fun _ -> sprintf "ThreadPool Function Work item %A terminates" (infoFunc(tpKey))))
  +                    x.ProcWaitHandle <- null
  +                    x.InProcessing <- false
                       closeAction()
                       // no more running on thread pool
                       SharedComponentState.Remove(x.CompBase.ComponentId, x.CompBase.SharedStateObj) |> ignore
  -                    x.ProcWaitHandle <- null
  -                    x.InProcessing <- false
                       (null, true)
                   else
                       x.ProcWaitHandle <- eventDQ
  
positive.code:         try
              if (x.IsTerminated) then
                  Logger.LogF( LogLevel.MildVerbose, (fun _ -> sprintf "ThreadPool Function Work item %A terminates" (infoFunc(tpKey))))
                  closeAction()
                  // no more running on thread pool
                  SharedComponentState.Remove(x.CompBase.ComponentId, x.CompBase.SharedStateObj) |> ignore
                  x.ProcWaitHandle <- null
                  x.InProcessing <- false
                  (null, true)
              else if (Utils.IsNotNull !item) then
                  // continue to process remaining work item
  
negative.code:             isTerminated <- true
              let spinWait = new SpinWait()
              let oldCnt = x.ProcCount
              // wait to prevent double release call for ReleaseItem on current item
              while (x.InProcessing && oldCnt=x.ProcCount) do
                  // if x.ProcCount has increased, then even if InProcessing, then Process has seen "isTerminated=true" condition
                  spinWait.SpinOnce()
  