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. Args: pre_await: A callback.
(self, pre_await: CallbackType | None)
| 36 | yield "caller", self._caller, None |
| 37 | |
| 38 | def set_pre_await_callback(self, pre_await: CallbackType | None) -> None: |
| 39 | """Set a callback to run prior to awaiting. |
| 40 | |
| 41 | This is used by Textual, mainly to check for possible deadlocks. |
| 42 | You are unlikely to need to call this method in an app. |
| 43 | |
| 44 | Args: |
| 45 | pre_await: A callback. |
| 46 | """ |
| 47 | self._pre_await = pre_await |
| 48 | |
| 49 | def call_next(self, node: MessagePump) -> Self: |
| 50 | """Await after the next message. |