Ejemplo n.º 1
0
 /// <summary>
 /// Shuts down. This forecefully kills the Task if there is one and then shuts down all Contexts on the stack,
 /// starting at the top.
 /// </summary>
 public void Dispose()
 {
     lock (_contextLock)
     {
         if (_topContext != null)
         {
             LOGGER.Log(Level.Info, "context stack not empty, forcefully closing context runtime.");
             _topContext.Dispose();
             _topContext = null;
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Shuts down. This forecefully kills the Task if there is one and then shuts down all Contexts on the stack,
 /// starting at the top.
 /// </summary>
 public void Dispose()
 {
     lock (_contextStack)
     {
         if (_contextStack != null && _contextStack.Any())
         {
             LOGGER.Log(Level.Info, "context stack not empty, forcefully closing context runtime.");
             ContextRuntime runtime = _contextStack.Last();
             if (runtime != null)
             {
                 runtime.Dispose();
             }
         }
     }
 }