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
095ee415
Commit
095ee415
authored
Mar 12, 2018
by
Thomas Moreau
Committed by
Andrew Svetlov
Mar 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (#6084)
parent
5d2a27de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Lib/concurrent/futures/process.py
Lib/concurrent/futures/process.py
+9
-2
Misc/NEWS.d/next/Library/2018-03-12-16-40-00.bpo-33056.lNN9Eh.rst
...S.d/next/Library/2018-03-12-16-40-00.bpo-33056.lNN9Eh.rst
+1
-0
No files found.
Lib/concurrent/futures/process.py
View file @
095ee415
...
...
@@ -78,11 +78,13 @@ _global_shutdown = False
class
_ThreadWakeup
:
__slot__
=
[
"_state"
]
def
__init__
(
self
):
self
.
_reader
,
self
.
_writer
=
mp
.
Pipe
(
duplex
=
False
)
def
close
(
self
):
self
.
_writer
.
close
()
self
.
_reader
.
close
()
def
wakeup
(
self
):
self
.
_writer
.
send_bytes
(
b""
)
...
...
@@ -654,6 +656,11 @@ class ProcessPoolExecutor(_base.Executor):
self
.
_call_queue
=
None
self
.
_result_queue
=
None
self
.
_processes
=
None
if
self
.
_queue_management_thread_wakeup
:
self
.
_queue_management_thread_wakeup
.
close
()
self
.
_queue_management_thread_wakeup
=
None
shutdown
.
__doc__
=
_base
.
Executor
.
shutdown
.
__doc__
atexit
.
register
(
_python_exit
)
Misc/NEWS.d/next/Library/2018-03-12-16-40-00.bpo-33056.lNN9Eh.rst
0 → 100644
View file @
095ee415
FIX properly close leaking fds in concurrent.futures.ProcessPoolExecutor.
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