src/concurrent/dotnet/Scheduler.cs
/// <summary>
/// Stop the background thread and call cancel
/// on all pending work items.
/// </summary>
Stop the background thread and call cancel
on all pending work items.
Stop the background thread and call cancel on all pending work items .
[MethodImpl(MethodImplOptions.Synchronized)]
    public void stop()
    {
      alive = false;
      try { thread.Interrupt(); } catch (System.Exception) {}
      Node node = head;
      while (node != null)
      {
        try { node.work.cancel(); } catch (System.Exception e) { Fan.Sys.Err.dumpStack(e); }
        node = node.next;
      }
      head = null;
    }
[ MethodImpl ( MethodImplOptions . Synchronized ) ] public void stop ( ) { alive = false ; try { thread . Interrupt ( ) ; } catch ( System . Exception ) { } Node node = head ; while ( node != null ) { try { node . work . cancel ( ) ; } catch ( System . Exception e ) { Fan . Sys . Err . dumpStack ( e ) ; } node = node . next ; } head = null ; }
Stop the background thread and call cancel
on all pending work items.
Stop the background thread and call cancel on all pending work items .
// kill background thread // call cancel on everything in queue // clear queue