Commit 0c41d8b
Edmond
Add Fiber::getCoroutine() method
Provides access to the underlying coroutine object when a fiber
is running inside an async coroutine. Returns null for regular fibers.
This allows using all coroutine methods (getId, getContext, cancel, etc.)
without duplicating the API in Fiber class.
Example usage:
$fiber = new Fiber(fn() => /* ... */);
$fiber->start();
$coroutine = $fiber->getCoroutine();
$id = $coroutine->getId();
$context = $coroutine->getContext();1 parent 9d72984 commit 0c41d8b
File tree
3 files changed
+22
-1
lines changed- Zend
3 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1794 | 1794 | | |
1795 | 1795 | | |
1796 | 1796 | | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
1797 | 1811 | | |
1798 | 1812 | | |
1799 | 1813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments