Esempio n. 1
0
 private void OnBackgroundStart(sCall call, out bool abort)
 {
     abort = false;
     lock (_runningThreads)
     {
         _runningThreads.Add(new NameValuePair(call.type.FullName + "." + call.Method.Name, Thread.CurrentThread));
     }
 }
Esempio n. 2
0
 private void OnBackgroundEnd(sCall call, double milliseconds, Exception error, bool timedOut)
 {
     lock (_runningThreads){
         for (int x = 0; x < _runningThreads.Count; x++)
         {
             if (((Thread)_runningThreads[x].Value).ManagedThreadId == Thread.CurrentThread.ManagedThreadId)
             {
                 _runningThreads.RemoveAt(x);
                 break;
             }
         }
     }
 }