Click or drag to resize
AB4D logo

BackgroundThreadsManager Methods

The BackgroundThreadsManager type exposes the following members.

Methods
 NameDescription
Public methodDispose Dispose
Public methodExecute Execute method executes the specified taskAction on all threads that were before set up with calling the SetupThreads(Int32) method. The taskAction gets a thread index as parameter.
Public methodGetException GetException returns an Exception object for the thread with the specified index. If no exception was thrown by this thread, then null is returned.
Public methodHasExceptions HasExceptions returns true if any executed action has thrown an exception.
Public methodSetupThreads SetupThreads sets up the background threads based on the specified threadsCount. When the number of currently created background threads is bigger then the specified threadsCount, the unused threads are scheduled to be aborted (see ThreadAbortDelayMs). To immediately abort unused threads set ThreadAbortDelayMs to 0 before calling this method.
Public methodWaitAll Waits indefinitely until all taskActions that were passed to the Execute(BackgroundTaskStartDelegate) method are completed.
Public methodWaitAll(Int32) Waits until all taskActions that were passed to the Execute(BackgroundTaskStartDelegate) method are completed. If the this takes longer than the millisecondsTimeout, the methods returns with false value.
Top
See Also