]> git.ipfire.org Git - thirdparty/tornado.git/commit
ioloop: Redefine instance() in terms of current() 2063/head
authorBen Darnell <ben@bendarnell.com>
Sun, 28 May 2017 14:44:55 +0000 (10:44 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 28 May 2017 14:44:55 +0000 (10:44 -0400)
commit1fd67df25d0517c8ba54e9154815012f5fb575aa
tree9df56be74fa0f857b40c628ef5f29e5d49861179
parent2e622ae71df4b877a4e3ced76c3fc3e93d416322
ioloop: Redefine instance() in terms of current()

This aligns us more closely with asyncio, which only has a single
get_event_loop() function. Most uses of instance() are simply a
holdover from before current() was introduced and are not actually
relying on its slightly different behavior, so we redefine it (and the
related methods install(), initialized(), and clear_instance()) in
terms of current().
docs/ioloop.rst
tornado/ioloop.py
tornado/testing.py