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 Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island-Android, Island-iOS, Island-iOS Simulator-x86_64, Island-macOS-x86_64, Island-tvOS, Island-tvOS Simulator-x86_64, Island-Ubuntu, Island-UIKit for Mac-x86_64, Island-watchOS, Island-watchOS Simulator, Island-Windows, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Platforms: .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator-x86_64, Island-macOS-x86_64, Island-tvOS, Island-tvOS Simulator-x86_64, Island-Ubuntu, Island-UIKit for Mac-x86_64, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Instance Methods


constructor initWithState ToffeeV2

Create a new instance with a given initial state. True means the initial state is set, so WaitFor won't block.

 

func constructor initWithState(withState aState: Boolean, Mode aMode: EventMode)

Parameters:

  • aState:
  • aMode:

constructor .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator-x86_64, Island-macOS-x86_64, Island-tvOS, Island-tvOS Simulator-x86_64, Island-Ubuntu, Island-UIKit for Mac-x86_64, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee

 

constructor withState(aState: Boolean) Mode(aMode: EventMode)

 

Event withState(Boolean aState) Mode(EventMode aMode)

 

init(withState aState: Boolean, Mode aMode: EventMode)

 

Event withState(Boolean aState) Mode(EventMode aMode)

Parameters:

  • aState:
  • aMode:

Dispose

Dispose this instance

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

Reset

Clears the event, wait for will block.

 

method Reset

 

void Reset()

 

func Reset()

 

void 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 Set

 

void Set()

 

func Set()

 

void Set()

WaitFor

Wait for the event to be set.

 

method WaitFor

 

void WaitFor()

 

func WaitFor()

 

void WaitFor()

WaitFor (Int32): Boolean

Wait for with a given timeout. Returns true on success.

 

method WaitFor(aTimeoutInMilliseconds: Int32): Boolean

 

Boolean WaitFor(Int32 aTimeoutInMilliseconds)

 

func WaitFor(_ aTimeoutInMilliseconds: Int32) -> Boolean

 

Boolean WaitFor(Integer aTimeoutInMilliseconds)

Parameters:

  • aTimeoutInMilliseconds:

WaitFor (TimeSpan): Boolean

Wait for with a given timeout. Returns true on success.

 

method WaitFor(aTimeout: TimeSpan): Boolean

 

Boolean WaitFor(TimeSpan aTimeout)

 

func WaitFor(_ aTimeout: TimeSpan) -> Boolean

 

Boolean WaitFor(TimeSpan aTimeout)

Parameters:

  • aTimeout: