… | |
… | |
838 | coro->flags |= CF_DESTROYED; |
838 | coro->flags |= CF_DESTROYED; |
839 | |
839 | |
840 | if (coro->flags & CF_READY) |
840 | if (coro->flags & CF_READY) |
841 | { |
841 | { |
842 | /* reduce nready, as destroying a ready coro effectively unreadies it */ |
842 | /* reduce nready, as destroying a ready coro effectively unreadies it */ |
843 | /* alternative: look through all ready queues and remove it */ |
843 | /* alternative: look through all ready queues and remove the coro */ |
844 | LOCK; |
844 | LOCK; |
845 | --coro_nready; |
845 | --coro_nready; |
846 | UNLOCK; |
846 | UNLOCK; |
847 | } |
847 | } |
848 | else |
848 | else |