Click or drag to resize
CfxWaitableEvent Class

[This is preliminary documentation and is subject to change.]

WaitableEvent is a thread synchronization tool that allows one thread to wait for another thread to finish some work. This is equivalent to using a Lock+ConditionVariable to protect a simple boolean value. However, using WaitableEvent in conjunction with a Lock to wait for a more complex state change (e.g., for an item to be added to a queue) is not recommended. In that case consider using a ConditionVariable instead of a WaitableEvent. It is safe to create and/or signal a WaitableEvent from any thread. Blocking on a WaitableEvent by calling the *wait() functions is not allowed on the browser process UI or IO threads.
Inheritance Hierarchy
SystemObject
  ChromiumCfxObject
    ChromiumCfxBase
      ChromiumCfxLibraryBase
        ChromiumCfxWaitableEvent

Namespace: Chromium
Assembly: ChromiumFX (in ChromiumFX.dll)
Syntax
public class CfxWaitableEvent : CfxLibraryBase

The CfxWaitableEvent type exposes the following members.

Properties
  NameDescription
Public propertyIsSignaled
Returns true (1) if the event is in the signaled state, else false (0). If the event was created with |automaticReset| set to true (1) then calling this function will also cause a reset.
Public propertyNativePtr
Provides access to the underlying native cef struct. This is a refcounted library struct derived from cef_base_t. Add a ref in order to keep it alive when this managed object go out of scope.
(Inherited from CfxLibraryBase.)
Top
Methods
  NameDescription
Public methodStatic memberCreate
Create a new waitable event. If |automaticReset| is true (1) then the event state is automatically reset to un-signaled after a single waiting thread has been released; otherwise, the state remains signaled until reset() is called manually. If |initiallySignaled| is true (1) then the event will start in the signaled state.
Public methodReset
Put the event in the un-signaled state.
Public methodSignal
Put the event in the signaled state. This causes any thread blocked on Wait to be woken up.
Public methodTimedWait
Wait up to |maxMs| milliseconds for the event to be signaled. Returns true (1) if the event was signaled. A return value of false (0) does not necessarily mean that |maxMs| was exceeded. This function will not return until after the call to signal() has completed. This function cannot be called on the browser process UI or IO threads.
Public methodWait
Wait indefinitely for the event to be signaled. This function will not return until after the call to signal() has completed. This function cannot be called on the browser process UI or IO threads.
Top
Remarks
See also the original CEF documentation in cef/include/capi/cef_waitable_event_capi.h.
See Also