Información general
Ejemplos
Pantallas
Comparaciones
Aplicaciones
Descargar
Documentation
"El Mercado"
Estado y Plan de trabajo
Preguntas más frecuentes
Autores y Licencia
Foros
Financiación de U++
Busca en esta página
Idioma
español











SourceForge.net Logo

Esta página aún no ha sido traducida. ¿Quieres traducirla?

 

ConditionVariable

 

class ConditionVariable

ConditionVariable allows threads to suspend execution (using Wait) until they are awaken by another thread (using Signal or Broadcast methods). ConditionVariable has associated Mutex to avoid possible race conditions when entering suspended state.

 

 

Public Method List

 

void Wait(Mutex& m)

Atomically unlocks m and starts waiting for Signal or Broadcast. m has to be owned by calling thread before invoking. When Signal or Broadcast are received, resumes execution and reacquires m.

 


 

void Signal()

Resumes execution of single waiting thread, if any.

 


 

void Broadcast()

Resumes execution of all currently waiting threads.

 

 

 

 

StaticConditionVariable

 

class StaticConditionVariable

Variant of ConditionVariable that can be used as static or global variable without the need of initialization  - it has no constructor and correctly performs the first initialization when any of methods is called. That avoids problems with initialization order or multithreaded initialization issues.

 

 

Public Method List

 

ConditionVariable& Get()

operator ConditionVariable&()

Returns the instance of ConditionVariable.

 


 

void Wait(Mutex& m)

void Signal()

void Broadcast()

Calls respective ConditionVariable methods.

 

 

Esta página está también en english. ¿Quieres ayudar?