We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9094153 commit 7338423Copy full SHA for 7338423
design/mvp/CanonicalABI.md
@@ -573,16 +573,6 @@ another task:
573
return self.process_event(self.events.get_nowait())
574
```
575
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
-
586
Lastly, when a task exists, the runtime enforces the guard conditions mentioned
587
above and releases the `thread` lock, allowing other tasks to start or make
588
progress.
0 commit comments