textual.await_complete
This module contains the AwaitComplete
class.
An AwaitComplete
object is returned by methods that do work in the background.
You can await this object if you need to know when that work has completed.
Or you can ignore it, and Textual will automatically await the work before handling the next message.
Note
You are unlikely to need to explicitly create these objects yourself.
AwaitComplete
¶
An 'optionally-awaitable' object which runs one or more coroutines (or other awaitables) concurrently.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Awaitable
|
One or more awaitables to run concurrently. |
()
|
call_next
¶
call_next(node)
Await after the next message.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
MessagePump
|
The node which created the object. |
required |
set_pre_await_callback
¶
set_pre_await_callback(pre_await)
Set a callback to run prior to awaiting.
This is used by Textual, mainly to check for possible deadlocks. You are unlikely to need to call this method in an app.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
CallbackType | None
|
A callback. |
required |