mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-11-14 23:28:43 +00:00
2312622923
The coroutine itself may hold some resources when going across pthread cancellable points. Now it is ensured (by semaphores) that either the main process or the coroutine is running so the coroutine is always cancelled inside coro_suspend() where everything is clean but it will change in future. Instead, we explicitly mark the coroutine freeze/cancel points by yielding there -- calling coro_suspend() and checking whether the master process has requested to stop. Where pthread_cancel() was, we instead set a flag and resume that thread to finish its work and exit itself. |
||
---|---|---|
.. | ||
bsd | ||
cf | ||
linux | ||
unix | ||
config.h | ||
progdoc | ||
sysdep.sgml |