C# 클래스 GSF.Threading.WorkerThreadSynchronization

Creates a synchronization helper that will assist object synchronizing in a tight inner loop.
For streaming protocols, it is cost prohibited to tightly coordinate the inner loop. This class will help coordinate these efforts by signaling when a good time to perform synchronized work would be. For Example, when writing to a socket, calling BeginSafeToCallbackRegion would be good to do when the socket makes any kind of blocking call, such as flusing to an underlying socket. Upon returning from this command, calling EndSafeToCallbackRegion will return this class to a state where callback will not be executed. It is critical that BeginSafeToCallbackRegion, EndSafeToCallbackRegion, and PulseSafeToCallback only be called by the worker thread, as these methods are not thread safe and control the state of the WorkerThreadSynchronization. In easy terms. When you (the worker) get a convenient time, I need to do something that might modify your current working state. Let me know when I can do that.
상속: GSF.Diagnostics.DisposableLoggingClassBase
파일 보기 프로젝트 열기: GridProtectionAlliance/openHistorian 1 사용 예제들

공개 메소드들

메소드 설명
RequestCallback ( System.Action callback ) : CallbackRequest

Requests that the following action be completed as soon as reasonably possible. This will either be done immediately, or be queued for the next approriate time.

WorkerThreadSynchronization ( ) : System

Creates a WorkerThreadSynchronization.

비공개 메소드들

메소드 설명
BeginSafeToCallbackRegion ( ) : void
EndSafeToCallbackRegion ( ) : void
ExecuteAllCallbacks ( ) : void
PulseSafeToCallback ( ) : void

메소드 상세

RequestCallback() 공개 메소드

Requests that the following action be completed as soon as reasonably possible. This will either be done immediately, or be queued for the next approriate time.
public RequestCallback ( System.Action callback ) : CallbackRequest
callback System.Action action to perform
리턴 CallbackRequest

WorkerThreadSynchronization() 공개 메소드

Creates a WorkerThreadSynchronization.
public WorkerThreadSynchronization ( ) : System
리턴 System