Python Condition Class Methods

Python Condition Class has the following built-in functions.

Method Description
acquire() Acquires a lock.
notify() Wakes up at most n of the threads that are waiting for the condition variable.
notify_all() Wakes all the threads which are waiting on a condition variable.
release() Releases the lock which has been acquired by the calling thread in order to free the critical section of the code.
wait() Blocks the thread and wait until some other thread notifies it by calling the notify() or notifyAll() method or if the timeout occurs.


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.