MCPcopy Create free account
hub / github.com/EasyIME/PIME / make_current

Method make_current

python/python3/tornado/ioloop.py:281–305  ·  view source on GitHub ↗

Makes this the `IOLoop` for the current thread. An `IOLoop` automatically becomes current for its thread when it is started, but it is sometimes useful to call `make_current` explicitly before starting the `IOLoop`, so that code run at startup time can find the right

(self)

Source from the content-addressed store, hash-verified

279 return current
280
281 def make_current(self) -> None:
282 """Makes this the `IOLoop` for the current thread.
283
284 An `IOLoop` automatically becomes current for its thread
285 when it is started, but it is sometimes useful to call
286 `make_current` explicitly before starting the `IOLoop`,
287 so that code run at startup time can find the right
288 instance.
289
290 .. versionchanged:: 4.1
291 An `IOLoop` created while there is no current `IOLoop`
292 will automatically become current.
293
294 .. versionchanged:: 5.0
295 This method also sets the current `asyncio` event loop.
296
297 .. deprecated:: 6.2
298 The concept of an event loop that is "current" without
299 currently running is deprecated in asyncio since Python
300 3.10. All related functionality in Tornado is also
301 deprecated. Instead, start the event loop with `asyncio.run`
302 before interacting with it.
303 """
304 # The asyncio event loops override this method.
305 raise NotImplementedError()
306
307 @staticmethod
308 def clear_current() -> None:

Callers 3

installMethod · 0.95
initializeMethod · 0.95
setUpMethod · 0.45

Calls

no outgoing calls

Tested by 1

setUpMethod · 0.36