Exemplo n.º 1
0
        public LongJobThread(ILongJobScheduler scheduler)
        {
            this.thread    = new Thread(new ThreadStart(this.Run));
            this.scheduler = scheduler;

            this.thread.Start();
        }
Exemplo n.º 2
0
 public JobStartup(ILongJobScheduler scheduler)
 {
     this.scheduler  = scheduler;
     this.disposable = LongJobs.Run(scheduler);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Runs the scheduler on a new thread that is stopped when the returned handle is disposed.
 /// </summary>
 /// <param name="scheduler">The job scheduler to run.</param>
 /// <returns>A handle that stops the scheduler when disposed.</returns>
 public static IDisposable Run(ILongJobScheduler scheduler)
 {
     return(new LongJobThread(scheduler));
 }