Skip to content

Commit 7338423

Browse files
committed
Update definitions.py to match CanonicalABI.md (3)
1 parent 9094153 commit 7338423

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

design/mvp/CanonicalABI.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -573,16 +573,6 @@ another task:
573573
return self.process_event(self.events.get_nowait())
574574
```
575575

576-
Additionally, the current task can cooperatively allow the runtime to switch to
577-
another task (e.g., to maintain concurrency during a long-running compute-bound
578-
task) by calling `yield_` (via `canon task.yield`, defined below):
579-
```python
580-
async def yield_(self):
581-
self.inst.thread.release()
582-
await asyncio.sleep(0)
583-
await self.inst.thread.acquire()
584-
```
585-
586576
Lastly, when a task exists, the runtime enforces the guard conditions mentioned
587577
above and releases the `thread` lock, allowing other tasks to start or make
588578
progress.

0 commit comments

Comments
 (0)