ManualResetEvent Class
Package: @esfx/threading-manualresetevent
Declaration
export declare class ManualResetEvent implements Disposable Constructors
constructor(initialState)
Constructs a new instance of the ManualResetEvent class
Declaration
constructor(initialState?: boolean);Parameters
- initialState
- boolean
constructor(buffer, byteOffset)
Constructs a new instance of the ManualResetEvent class
Declaration
constructor(buffer: SharedArrayBuffer, byteOffset?: number);Parameters
- buffer
- SharedArrayBuffer
- byteOffset
- number
Properties
buffer
Gets the SharedArrayBuffer for this event.
Declaration
get buffer(): SharedArrayBuffer;Property Value
byteLength
Gets the number of bytes occupied by this event in its buffer.
Declaration
get byteLength(): number;Property Value
byteOffset
Gets the byte offset of this event in its buffer.
Declaration
get byteOffset(): number;Property Value
isSet
Gets a value indicating whether the event is currently set (e.g., in the signaled state).
Declaration
get isSet(): boolean;Property Value
SIZE
Declaration
static readonly SIZE = 4;Methods
[Disposable.dispose]()
Releases all resources for this event.
Declaration
[Disposable.dispose](): void;Returns
close()
Releases all resources for this event.
Declaration
close(): void;Returns
reset()
Sets the state of the event to nonsignaled, causing any threads waiting on the event to block.
Declaration
reset(): boolean;Returns
true if the event was reset; otherwise, false.
set()
Sets the state of the event to signaled, allowing any threads waiting on the event to proceed.
Declaration
set(): boolean;Returns
true if the event was set; otherwise, false.
waitOne(ms)
Blocks the current thread until this event becomes signaled.
Declaration
waitOne(ms?: number): boolean;Parameters
Returns
true if the event was signaled before the timeout expired; otherwise, false.