diff --git a/design/mvp/CanonicalABI.md b/design/mvp/CanonicalABI.md index 290e8d17..b93363ae 100644 --- a/design/mvp/CanonicalABI.md +++ b/design/mvp/CanonicalABI.md @@ -933,7 +933,7 @@ external I/O. This is emulated in the Python code below by waiting on an immediately-resolved future, which calls the `OnBlock` callback, which allows control flow to switch to other `asyncio.Task`s. ```python - async def yield_(self, sync) -> bool: + async def yield_(self, sync) -> EventTuple: if self.state == Task.State.PENDING_CANCEL: self.state = Task.State.CANCEL_DELIVERED return (EventCode.TASK_CANCELLED, 0, 0) diff --git a/design/mvp/canonical-abi/definitions.py b/design/mvp/canonical-abi/definitions.py index 588d65e6..118c5bd7 100644 --- a/design/mvp/canonical-abi/definitions.py +++ b/design/mvp/canonical-abi/definitions.py @@ -587,7 +587,7 @@ async def wait_for_event(self, waitable_set, sync) -> EventTuple: waitable_set.num_waiting -= 1 return e - async def yield_(self, sync) -> bool: + async def yield_(self, sync) -> EventTuple: if self.state == Task.State.PENDING_CANCEL: self.state = Task.State.CANCEL_DELIVERED return (EventCode.TASK_CANCELLED, 0, 0)