diff options
author | Éric Araujo <merwok@netwok.org> | 2011-07-27 22:28:28 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-07-27 22:28:28 (GMT) |
commit | 0cdd4454f37a55bad9c80b6dc1ee328161df4496 (patch) | |
tree | 275ba983baf566c07f6a952142a8041d276ac178 /Lib/multiprocessing | |
parent | 9bce311ea4f58ec04cab356a748e173ecfea381c (diff) | |
download | cpython-0cdd4454f37a55bad9c80b6dc1ee328161df4496.zip cpython-0cdd4454f37a55bad9c80b6dc1ee328161df4496.tar.gz cpython-0cdd4454f37a55bad9c80b6dc1ee328161df4496.tar.bz2 |
Remove indirection in threading (issue #10968).
The public names (Thread, Condition, etc.) used to be factory functions
returning instances of hidden classes (_Thread, _Condition, etc.),
because (if Guido recalls correctly) this code pre-dates the ability to
subclass extension types.
It is now possible to inherit from Thread and other classes, without
having to import the private underscored names like multiprocessing did.
A doc update will follow: a patch is under discussion on the issue.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/dummy/__init__.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py index c4933d9..60add92 100644 --- a/Lib/multiprocessing/dummy/__init__.py +++ b/Lib/multiprocessing/dummy/__init__.py @@ -51,7 +51,7 @@ import itertools from multiprocessing import TimeoutError, cpu_count from multiprocessing.dummy.connection import Pipe from threading import Lock, RLock, Semaphore, BoundedSemaphore -from threading import Event +from threading import Event, Condition from queue import Queue # @@ -84,17 +84,6 @@ class DummyProcess(threading.Thread): # # -class Condition(threading._Condition): - # XXX - if sys.version_info < (3, 0): - notify_all = threading._Condition.notify_all.__func__ - else: - notify_all = threading._Condition.notify_all - -# -# -# - Process = DummyProcess current_process = threading.current_thread current_process()._children = weakref.WeakKeyDictionary() |