acquire方法
Python Condition.acquire()方法 (Python Condition.acquire() Method)
acquire() is an inbuilt method of the Condition class of the threading module in Python.
acquisition()是Python中线程模块的Condition类的内置方法。
Condition class implements condition variable objects. A condition variable allows one or more threads to wait until they are notified by another thread. Acquire method is used to acquire a lock. It calls the corresponding method on the underlying lock and returns the method value.
条件类实现条件变量对象 。 条件变量允许一个或多个线程等待,直到被另一个线程通知为止。 获取方法用于获取锁。 它在基础锁上调用相应的方法,并返回该方法的值。
The Producer-Consumer problem works as a perfect use case for Condition object in multithreading. In