Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
5657ffe9
Commit
5657ffe9
authored
Nov 30, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks to FileObjectThread._do_close to break reference cycles in the event of an exception.
parent
9b87786b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/gevent/_fileobjectcommon.py
src/gevent/_fileobjectcommon.py
+8
-2
No files found.
src/gevent/_fileobjectcommon.py
View file @
5657ffe9
...
...
@@ -227,12 +227,18 @@ class FileObjectThread(FileObjectBase):
# the existing race condition any worse.
# We wrap the close in an exception handler and re-raise directly
# to avoid the (common, expected) IOError from being logged by the pool
def
close
():
def
close
(
_fobj
=
fobj
):
try
:
fobj
.
close
()
_
fobj
.
close
()
except
:
# pylint:disable=bare-except
return
sys
.
exc_info
()
finally
:
_fobj
=
None
del
fobj
exc_info
=
self
.
threadpool
.
apply
(
close
)
del
close
if
exc_info
:
reraise
(
*
exc_info
)
...
...
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