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
71a28a91
Commit
71a28a91
authored
Jul 09, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
parent
37009207
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
Lib/multiprocessing/connection.py
Lib/multiprocessing/connection.py
+6
-6
Lib/multiprocessing/util.py
Lib/multiprocessing/util.py
+5
-1
No files found.
Lib/multiprocessing/connection.py
View file @
71a28a91
...
@@ -290,8 +290,8 @@ if win32:
...
@@ -290,8 +290,8 @@ if win32:
"""
"""
_buffered
=
b''
_buffered
=
b''
def
_close
(
self
):
def
_close
(
self
,
_CloseHandle
=
win32
.
CloseHandle
):
win32
.
CloseHandle
(
self
.
_handle
)
_
CloseHandle
(
self
.
_handle
)
def
_send_bytes
(
self
,
buf
):
def
_send_bytes
(
self
,
buf
):
overlapped
=
win32
.
WriteFile
(
self
.
_handle
,
buf
,
overlapped
=
True
)
overlapped
=
win32
.
WriteFile
(
self
.
_handle
,
buf
,
overlapped
=
True
)
...
@@ -376,13 +376,13 @@ class Connection(_ConnectionBase):
...
@@ -376,13 +376,13 @@ class Connection(_ConnectionBase):
"""
"""
if
win32
:
if
win32
:
def
_close
(
self
):
def
_close
(
self
,
_close
=
win32
.
closesocket
):
win32
.
closesocket
(
self
.
_handle
)
_close
(
self
.
_handle
)
_write
=
win32
.
send
_write
=
win32
.
send
_read
=
win32
.
recv
_read
=
win32
.
recv
else
:
else
:
def
_close
(
self
):
def
_close
(
self
,
_close
=
os
.
close
):
os
.
close
(
self
.
_handle
)
_
close
(
self
.
_handle
)
_write
=
os
.
write
_write
=
os
.
write
_read
=
os
.
read
_read
=
os
.
read
...
...
Lib/multiprocessing/util.py
View file @
71a28a91
...
@@ -188,7 +188,11 @@ class Finalize(object):
...
@@ -188,7 +188,11 @@ class Finalize(object):
_finalizer_registry
[
self
.
_key
]
=
self
_finalizer_registry
[
self
.
_key
]
=
self
def
__call__
(
self
,
wr
=
None
):
def
__call__
(
self
,
wr
=
None
,
# Need to bind these locally because the globals can have
# been cleared at shutdown
_finalizer_registry
=
_finalizer_registry
,
sub_debug
=
sub_debug
):
'''
'''
Run the callback unless it has already been called or cancelled
Run the callback unless it has already been called or cancelled
'''
'''
...
...
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