Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
26480082
Commit
26480082
authored
Jun 25, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get rid of 2.6/3.0 switch statements in multiprocessing
parent
b09c9396
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
23 deletions
+6
-23
Lib/multiprocessing/dummy/__init__.py
Lib/multiprocessing/dummy/__init__.py
+6
-18
Lib/multiprocessing/managers.py
Lib/multiprocessing/managers.py
+0
-5
No files found.
Lib/multiprocessing/dummy/__init__.py
View file @
26480082
...
...
@@ -53,30 +53,18 @@ class DummyProcess(threading.Thread):
else
:
return
None
# XXX
if
sys
.
version_info
<
(
3
,
0
):
is_alive
=
threading
.
Thread
.
is_alive
.
im_func
get_name
=
threading
.
Thread
.
get_name
.
im_func
set_name
=
threading
.
Thread
.
set_name
.
im_func
is_daemon
=
threading
.
Thread
.
is_daemon
.
im_func
set_daemon
=
threading
.
Thread
.
set_daemon
.
im_func
else
:
is_alive
=
threading
.
Thread
.
is_alive
get_name
=
threading
.
Thread
.
get_name
set_name
=
threading
.
Thread
.
set_name
is_daemon
=
threading
.
Thread
.
is_daemon
set_daemon
=
threading
.
Thread
.
set_daemon
is_alive
=
threading
.
Thread
.
is_alive
.
im_func
get_name
=
threading
.
Thread
.
get_name
.
im_func
set_name
=
threading
.
Thread
.
set_name
.
im_func
is_daemon
=
threading
.
Thread
.
is_daemon
.
im_func
set_daemon
=
threading
.
Thread
.
set_daemon
.
im_func
#
#
#
class
Condition
(
threading
.
_Condition
):
# XXX
if
sys
.
version_info
<
(
3
,
0
):
notify_all
=
threading
.
_Condition
.
notify_all
.
im_func
else
:
notify_all
=
threading
.
_Condition
.
notify_all
notify_all
=
threading
.
_Condition
.
notify_all
.
im_func
#
#
...
...
Lib/multiprocessing/managers.py
View file @
26480082
...
...
@@ -41,11 +41,6 @@ def reduce_array(a):
copy_reg
.
pickle
(
array
.
array
,
reduce_array
)
view_types
=
[
type
(
getattr
({},
name
)())
for
name
in
(
'items'
,
'keys'
,
'values'
)]
if
view_types
[
0
]
is
not
list
:
# XXX only needed in Py3.0
def
rebuild_as_list
(
obj
):
return
list
,
(
list
(
obj
),)
for
view_type
in
view_types
:
copy_reg
.
pickle
(
view_type
,
rebuild_as_list
)
#
# Type for identifying shared objects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment