View source code
Display the source code in std/concurrency.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Function std.concurrency.Scheduler.newCondition
Creates a Condition varialbe analog for signaling.
Creates a new Condition variable analog which is used to check for and
to signal the addition of messages to a thread's message queue. Like
yield
, some schedulers may need to define custom behavior so that calls
to Condition.wait() yield
to another thread when no new messages are
available instead of blocking.
Prototype
abstract Condition newCondition( Mutex m ) nothrow;
Parameters
Name | Description |
---|---|
m | The Mutex that will be associated with this condition. It will be
locked prior to any operation on the condition, and so in some
cases a Scheduler may need to hold this reference and unlock the
mutex before yielding execution to another logical thread. |
Authors
Sean Kelly, Alex Rønne Petersen, Martin Nowak