cpython/Misc/NEWS.d/next/Library/2020-05-17-02-03-09.bpo-323...

4 lines
292 B
ReStructuredText

Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used for
running IO-bound functions in a separate thread to avoid blocking the event
loop, and essentially works as a high-level version of
:meth:`~asyncio.loop.run_in_executor` that can directly take keyword arguments.