Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit b99158c

Browse filesBrowse files
committed
Fix issue #1 by using staticmethod to prevent unintended conversion of Lock to a
staticmethod.
1 parent 039c1d5 commit b99158c
Copy full SHA for b99158c

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎async/pool.py

Copy file name to clipboardExpand all lines: async/pool.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,5 +508,7 @@ def add_task(self, task):
508508
class ThreadPool(Pool):
509509
"""A pool using threads as worker"""
510510
WorkerCls = WorkerThread
511-
LockCls = Lock
511+
# NOTE: Since threading.Lock is a method not a class, we need to prevent
512+
# conversion to an unbound method.
513+
LockCls = staticmethod(Lock)
512514
TaskQueueCls = AsyncQueue

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.