ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

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.
ADVERTISEMENT




Comments and Discussions

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.