Home | All Classes | Grouped Classes | Index | Search

# CL_Mutex::wait

Releases the mutex this thread has taken out and sends the thread to sleep.

    	void wait();

Detailed description:

Other threads can then acquire the mutex and modify any data. When another thread calls notify, the thread that called wait will wake up again and automatically reacquire the mutex.

Warning: This function must not be called on an unlocked mutex. You must call enter first.

Warning: When wait returns (after another thread has called notify/notifyAll, the current thread will have a mutex lock. Be sure to call leave at some point.

Warning: Not implemented under Win32. If you need it, please implement it in Sources/Core/System/Win32/mutex_win32.*, and send me the patch. :-)

See also:

CL_Mutex

Questions or comments, write to the ClanLib mailing list.