Event
Overview
System event, can be used to wake up things that are (blocking) waiting for something to happen.
Location
- Reference:
- Elements.dll .NET, .NET Core 6.0, .NET Standard 2.0
- elements.jar Cooper
- Elements.fx Island-Android, Island-iOS Simulator, Island-iOS-arm64, Island-Mac Catalyst, Island-macOS, Island-tvOS Simulator, Island-tvOS-arm64, Island-Ubuntu, Island-visionOS Simulator, Island-visionOS-arm64, Island-watchOS Simulator, Island-watchOS-arm64_32, Island-Windows, ToffeeV2
- libElements.fx Toffee
- Namespace: RemObjects.Elements.RTL
- Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island-Android, Island-iOS Simulator, Island-iOS-arm64, Island-Mac Catalyst, Island-macOS, Island-tvOS Simulator, Island-tvOS-arm64, Island-Ubuntu, Island-visionOS Simulator, Island-visionOS-arm64, Island-watchOS Simulator, Island-watchOS-arm64_32, Island-Windows, Toffee, ToffeeV2
Instance Methods
constructor
constructor withState(aState: Boolean := false) Mode(aMode: EventMode := EventMode.AutoReset)Event withState(Boolean aState = false) Mode(EventMode aMode = EventMode.AutoReset)init(state aState: Boolean = false, Mode aMode: EventMode = EventMode.AutoReset)Event withState(Boolean aState) Mode(EventMode aMode)Sub New withState(aState As Boolean = false) Mode(aMode As EventMode = EventMode.AutoReset)Parameters:
- aState:
- aMode:
Dispose
Dispose this instance
method Disposevoid Dispose()func Dispose()void Dispose()Sub Dispose()Reset
Clears the event, wait for will block.
method Resetvoid Reset()func Reset()void Reset()Sub Reset()Set
Sets the event; depending on the mode this sets it just once, or automatically resets it after the first thread waits for it.
method Setvoid Set()func Set()void Set()Sub Set()WaitFor
Wait for the event to be set.
method WaitForvoid WaitFor()func WaitFor()void WaitFor()Sub WaitFor()Wait for with a given timeout. Returns true on success.
method WaitFor(aTimeout: TimeSpan): BooleanBoolean WaitFor(TimeSpan aTimeout)func WaitFor(_ aTimeout: TimeSpan) -> BooleanBoolean WaitFor(TimeSpan aTimeout)Function WaitFor(aTimeout As TimeSpan) As BooleanParameters:
- aTimeout:
Wait for with a given timeout. Returns true on success.
method WaitFor(aTimeoutInMilliseconds: Int32): BooleanBoolean WaitFor(Int32 aTimeoutInMilliseconds)func WaitFor(_ aTimeoutInMilliseconds: Int32) -> BooleanBoolean WaitFor(Integer aTimeoutInMilliseconds)Function WaitFor(aTimeoutInMilliseconds As Int32) As BooleanParameters:
- aTimeoutInMilliseconds: