Applies to: desktop apps | Metro style apps
Initializes a condition variable.
Syntax
VOID WINAPI InitializeConditionVariable( __out PCONDITION_VARIABLE ConditionVariable );
Parameters
- ConditionVariable [out]
-
A pointer to the condition variable.
Return value
This function does not return a value.
Remarks
Threads can atomically release a lock and enter the sleeping state using the SleepConditionVariableCS or SleepConditionVariableSRW function. The threads are woken using the WakeConditionVariable or WakeAllConditionVariable function.
Condition variables are user-mode objects that cannot be shared across processes.
Examples
For an example that uses this function, see Using Condition Variables.
Requirements
|
Minimum supported client | Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012
I cannot debug any application which contains InitializeConditionVariable() api call. Trying to start the debugger on a very simple console application, the application seems to start, but exits immediately without executing anything from main. Of course, the code is compiled without errors and warnings.
XP SP3, Visual C++ Express 2010