ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Threading.TDelayedProcedure.CreateAndQueue

Creates an instance of this object and adds it to the global thread pool.

Syntax
Pascal
class function CreateAndQueue(pMethod: TThreadProcedure; pDelay: Integer = 300; pExecuteAsynchronous: Boolean = False; const pCancellationToken: ICancellationIndicator = nil): IWorkItem; overload;
Parameters 
Description 
pMethod: TThreadProcedure 
The method that should be executed. 
pDelay: Integer = 300 
Optional. The delay in milliseconds that at least the execution of this method should be delayed. The default value id 300ms. 
pExecuteAsynchronous: Boolean = False 
Optional. Pass True to execute the method asynchronous to the main thread, pass False to execute it in the context of the main thread. The dafault value is False. 
const pCancellationToken: ICancellationIndicator = nil 
Optional. A cancellation token. 

A new IWorkItem that will execute the given procedure after a delay.