]> git.ipfire.org Git - thirdparty/tornado.git/commit
Allow and encourage the use of file objects instead of integer fds in IOLoop.
authorBen Darnell <ben@bendarnell.com>
Sat, 18 Jan 2014 18:09:18 +0000 (13:09 -0500)
committerBen Darnell <ben@bendarnell.com>
Sat, 18 Jan 2014 18:09:18 +0000 (13:09 -0500)
commit7552caed9966b01d01786229ccc2cc9049e8068d
tree79efe46ab0c76d850215460e56789affa5c1dfba
parentf52976ae24b30178f92869d8dd89aa5e4a5fc1eb
Allow and encourage the use of file objects instead of integer fds in IOLoop.

This fixes a problem in tests in which a closing IOLoop would os.close()
all of its file descriptors while socket objects for those fds still
existed.  When those socket objects were garbage collected, they would
close the fd a second time (by which time it may have been reassigned
to a new socket).

Due to subtleties of garbage collection this has only been observed
with the asyncio event loop in tests of curl_httpclient.
tornado/ioloop.py
tornado/iostream.py
tornado/platform/asyncio.py
tornado/platform/kqueue.py
tornado/platform/select.py
tornado/platform/twisted.py
tornado/test/ioloop_test.py
tox.ini