| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 007bb06 commit 2b20136
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -614,8 +614,7 @@ Running in Threads | |||
| 614 | 614 | allowing context variables from the event loop thread to be accessed in the | |
| 615 | 615 | separate thread. | |
| 616 | 616 | ||
| 617 | - Return an :class:`asyncio.Future` which represents the eventual result of | ||
| 618 | - *func*. | ||
| 617 | + Return a coroutine that can be awaited to get the eventual result of *func*. | ||
| 619 | 618 | ||
| 620 | 619 | This coroutine function is primarily intended to be used for executing | |
| 621 | 620 | IO-bound functions/methods that would otherwise block the event loop if | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,7 @@ async def to_thread(func, /, *args, **kwargs): | |||
| 17 | 17 | allowing context variables from the main thread to be accessed in the | |
| 18 | 18 | separate thread. | |
| 19 | 19 | ||
| 20 | - Return an asyncio.Future which represents the eventual result of *func*. | ||
| 20 | + Return a coroutine that can be awaited to get the eventual result of *func*. | ||
| 21 | 21 | """ | |
| 22 | 22 | loop = events.get_running_loop() | |
| 23 | 23 | ctx = contextvars.copy_context() | |
| Back | FazBrowse Home | New Git URL |
0 commit comments