Deprecated alias for `IOLoop.current()`. .. versionchanged:: 5.0 Previously, this method returned a global singleton `IOLoop`, in contrast with the per-thread `IOLoop` returned by `current()`. In nearly all cases the two were the same (when they
()
| 182 | |
| 183 | @staticmethod |
| 184 | def instance() -> "IOLoop": |
| 185 | """Deprecated alias for `IOLoop.current()`. |
| 186 | |
| 187 | .. versionchanged:: 5.0 |
| 188 | |
| 189 | Previously, this method returned a global singleton |
| 190 | `IOLoop`, in contrast with the per-thread `IOLoop` returned |
| 191 | by `current()`. In nearly all cases the two were the same |
| 192 | (when they differed, it was generally used from non-Tornado |
| 193 | threads to communicate back to the main thread's `IOLoop`). |
| 194 | This distinction is not present in `asyncio`, so in order |
| 195 | to facilitate integration with that package `instance()` |
| 196 | was changed to be an alias to `current()`. Applications |
| 197 | using the cross-thread communications aspect of |
| 198 | `instance()` should instead set their own global variable |
| 199 | to point to the `IOLoop` they want to use. |
| 200 | |
| 201 | .. deprecated:: 5.0 |
| 202 | """ |
| 203 | return IOLoop.current() |
| 204 | |
| 205 | def install(self) -> None: |
| 206 | """Deprecated alias for `make_current()`. |
no test coverage detected