Class: glfwcondition

Condition variables are used to synchronize threads. A thread can wait for a condition variable to be signaled by another thread.

Hierarchy

o-+ thread
  o-+ glfwcondition

Interfaces:

Methods:

Method overview:


new ()
returns: ([glfwcondition])
Threadsafe
creates a new conditionobject and returns the new condition or nothing if a mutex couldn't be created
broadcast (glfwcondition)
returns: ()
Threadsafe
The function restarts all the threads that are waiting on the condition. If no threads are waiting on cond, nothing happens. Note: When several threads are waiting for the condition variable, the order in which threads are started depends on operating system scheduling rules, and may vary from system to system and from time to time.
delete (glfwcondition)
returns: ()
Threadsafe
delete a condition variable
signal (glfwcondition)
returns: ()
Threadsafe
The function restarts one of the threads that are waiting on the condition variable cond. If no threads are waiting on cond, nothing happens. If several threads are waiting on cond, exactly one is restarted, but it is not specified which.
wait (glfwcondition,[int timeout=-1])
returns: ()
Threadsafe
Waits for the condition to be signaled. The thread execution is suspended and does not consume any CPU time until the condition variable is signaled or the amount of time specified by timeout has passed. If timeout is <-1, glfwWaitCond will wait forever for cond to be signaled. Before returning to the calling thread, glfwWaitCond automatically re-acquires the mutex.

Inherited Methods: