Contents
class CountdownSignal <M> Source #
IO signalling, usually used to signal for cross-thread synchronisation.
Properties
Methods
method K<M, bool> Trigger () Source #
Triggers a single countdown of the counter in the signal
Parameters
returns | True if the counter reached zero. |
method bool TriggerUnsafe () Source #
Triggers a single countdown of the counter in the signal
Parameters
returns | True if the counter reached zero. |
method K<M, bool> Trigger (int count) Source #
Triggers n
signals to the counter in the signal
This is marked unsafe because it's not in an IO
operation and therefore is impure.
Parameters
returns | True if the counter reached zero. |
method bool TriggerUnsafe (int count) Source #
Triggers n
signals to the counter in the signal
This is marked unsafe because it's not in an IO
operation and therefore is impure.
Parameters
returns | True if the counter reached zero. |
IO signalling, usually used to signal for cross-thread synchronisation.
Methods
method K<M, bool> Trigger () Source #
Set the signal
Parameters
returns | True if the operation succeeds |
method bool TriggerUnsafe () Source #
Set the signal
This is marked unsafe because it's not in an IO
operation and therefore is impure.
Parameters
returns | True if the operation succeeds |
IO signalling constructors
Methods
method K<M, Signal<M>> autoReset <M> (bool signaled = false) Source #
Represents a thread synchronisation event that, when signaled, resets automatically after releasing a single waiting thread.
The internal EventWaitHandle
is wrapped with a use
operator so that its handle is tracked by the IO
resource-management system and auto-cleaned up if not done manually with release
or using bracket
.
Parameters
param | signaled |
method K<M, Signal<M>> manualReset <M> (bool signaled = false) Source #
Represents a thread synchronisation event that, when signaled, must be reset manually.
The internal EventWaitHandle
is wrapped with a use
operator so that its handle is tracked by the IO
resource-management system and auto-cleaned up if not done manually with release
or using bracket
.
Parameters
param | signaled |
method K<M, CountdownSignal<M>> countdown <M> (int count) Source #
Represents a synchronisation primitive that is signaled when its count reaches zero.
The internal EventWaitHandle
is wrapped with a use
operator so that its handle is tracked by the IO
resource-management system and auto-cleaned up if not done manually with release
or using bracket
.