interface Tinman.Core.Threading.IThreadMain

Derived from


Extended by

ThreadMainBase abstract
Tutorial_02_Mandelbrot sealed

Base interface for classes that provide a main method for a background thread.

Public / Methods


public method RequestStop → ()

Signals the running thread main method to terminate gracefully.

This method is called exactly once; either when the Thread.Stop method is invoked for the first time or when the thread is disposed.


public method Run → (1)

context in : ThreadContext

The thread context object.

This is the main method of the thread.

If this method throws an exception, the thread is terminated; the exception details can then be obtained via Thread.Error.


public method WaitingForStop → ()

This method is invoked regularly when one thread has requested another one to stop and is waiting for its termination.

This callback allows a thread to perform actions while being blocked inside Thread.Join resp. IDisposable.Dispose (which implicitly joins on the thread), for example flushing buffers in order to avoid dead locks.