Skip to content

Commit

Permalink
add IOLoop.clear_instance
Browse files Browse the repository at this point in the history
like clear_current, but for the global IOLoop instance
  • Loading branch information
minrk committed Mar 21, 2014
1 parent 4ff47bb commit dd45026
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tornado/ioloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ def install(self):
assert not IOLoop.initialized()
IOLoop._instance = self

@staticmethod
def clear_instance():
"""Clear the global `IOLoop` instance."""
if hasattr(IOLoop, "_instance"):
del IOLoop._instance

@staticmethod
def current():
"""Returns the current thread's `IOLoop`.
Expand Down

0 comments on commit dd45026

Please sign in to comment.