
For the Python implementation of threading.RLock because the new C implementation of threading.RLock of Python 3.3 is not compatible with eventlet monkey patching. Fix the issue #185.
24 lines
421 B
Python
24 lines
421 B
Python
# Issue #185: test threading.Condition with monkey-patching
|
|
import eventlet
|
|
|
|
# no standard tests in this file, ignore
|
|
__test__ = False
|
|
|
|
|
|
if __name__ == '__main__':
|
|
eventlet.monkey_patch()
|
|
|
|
import threading
|
|
|
|
def func(c):
|
|
with c:
|
|
c.notify()
|
|
|
|
c = threading.Condition()
|
|
with c:
|
|
t = threading.Thread(target=func, args=(c,))
|
|
t.start()
|
|
c.wait()
|
|
|
|
print('pass')
|