Movatterモバイル変換


[0]ホーム

URL:


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

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

Commitb99158c

Browse files
committed
Fix issue#1 by using staticmethod to prevent unintended conversion of Lock to a
staticmethod.
1 parent039c1d5 commitb99158c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎async/pool.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,5 +508,7 @@ def add_task(self, task):
508508
classThreadPool(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)

[8]ページ先頭

©2009-2025 Movatter.jp