Skip to content

Commit

Permalink
add some attributes to multiprocessing.dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjekyejoannah committed Oct 11, 2023
1 parent f27b830 commit d93bcbe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Lib/multiprocessing/dummy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
__all__ = [
'Process', 'current_process', 'active_children', 'freeze_support',
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition',
'Event', 'Barrier', 'Queue', 'Manager', 'Pipe', 'Pool', 'JoinableQueue'
'Event', 'Barrier', 'Queue', 'Manager', 'Pipe', 'Pool', 'JoinableQueue',
'ProcessError', 'parent_process', 'cpu_count', 'Value', 'Array', 'Manager'
]

#
Expand All @@ -24,7 +25,7 @@

from .connection import Pipe
from threading import Lock, RLock, Semaphore, BoundedSemaphore
from threading import Event, Condition, Barrier
from threading import Event, Condition, Barrier, ThreadError
from queue import Queue

#
Expand Down Expand Up @@ -62,7 +63,10 @@ def exitcode(self):
#

Process = DummyProcess
ProcessError = ThreadError
current_process = threading.current_thread
parent_process = threading.main_thread
cpu_count = threading.active_count
current_process()._children = weakref.WeakKeyDictionary()

def active_children():
Expand Down

0 comments on commit d93bcbe

Please sign in to comment.