|
SynchronizedOperationBaseExecuteActionAsync Method
|
Executes the action on a separate thread.
Namespace: GSF.ThreadingAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.253-beta+ffb7163c9e3b771705bc5b9aa3f09870f2cb9e2c
Syntaxprotected abstract void ExecuteActionAsync()
Protected MustOverride Sub ExecuteActionAsync
protected:
virtual void ExecuteActionAsync() abstract
abstract ExecuteActionAsync : unit -> unit
function ExecuteActionAsync();
View Source
Remarks
Implementers should call
ExecuteAction on a separate thread
and check the return value. If it returns true, that means it needs to run
again. The following is a sample implementation using a regular dedicated
thread.
protected override void ExecuteActionAsync()
{
Thread actionThread = new Thread(() =>
{
while (ExecuteAction())
{
}
});
actionThread.Start();
}
See Also