Guard `async::task` joins and move assignment (#5266) Joining a running task from an io thread of its own io_context, or after that context stopped, never returns. The debug asserts against this lived in `tcp_server`, `tcp_socket` and `tcp_channel` `stop ()`, one copy each, and the listener's join sites had none. `task::join ()` now release asserts both through the strand's inner executor whenever it would have to wait, so a release node aborts with a message instead of hanging, and the copies are gone. A finished task still joins from any thread, any number of times, even after shutdown. Move assignment overwrote the target's future unchecked, which detached a running coroutine from the only handle that can cancel or join it. It now asserts the target is not running, as the destructor does. Death tests cover the join and move guards, the destructor, the empty task and a moved-from condition; plain tests cover joining finished tasks after the context stopped and from an io thread.
__________
Type: commit
Hash: 8c173d9ecabd301755979bcfb7ac0267993d7ce2
Created: yesterday
__________
gr0v1ty/nano-node:8c173d9ecabd301755979bcfb7ac0267993d7ce2
| Test Case | Status | Duration | Median Deviation | Log | Graph |
|---|---|---|---|---|---|
| No test results available yet. Check the GitHub test run for job status and logs. | |||||