Skip to content

Commit 85ca43d

Browse files
fix: output types of Task.yield_ (#530)
Signed-off-by: Victor Adossi <[email protected]>
1 parent e5ef485 commit 85ca43d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

design/mvp/CanonicalABI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ external I/O. This is emulated in the Python code below by waiting on an
933933
immediately-resolved future, which calls the `OnBlock` callback, which allows
934934
control flow to switch to other `asyncio.Task`s.
935935
```python
936-
async def yield_(self, sync) -> bool:
936+
async def yield_(self, sync) -> EventTuple:
937937
if self.state == Task.State.PENDING_CANCEL:
938938
self.state = Task.State.CANCEL_DELIVERED
939939
return (EventCode.TASK_CANCELLED, 0, 0)

design/mvp/canonical-abi/definitions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ async def wait_for_event(self, waitable_set, sync) -> EventTuple:
587587
waitable_set.num_waiting -= 1
588588
return e
589589

590-
async def yield_(self, sync) -> bool:
590+
async def yield_(self, sync) -> EventTuple:
591591
if self.state == Task.State.PENDING_CANCEL:
592592
self.state = Task.State.CANCEL_DELIVERED
593593
return (EventCode.TASK_CANCELLED, 0, 0)

0 commit comments

Comments
 (0)