forked from goodboy/tractor
In particular ensuring we use `ctx._pld_rx.recv_msg_nowait()` from `.receive_nowait()` (which is called from `.aclose()`) such that we ALWAYS (can) set the surrounding `Context._result/._outcome_msg` attrs on reception of a final `Return`!! This fixes a final stream-teardown-race-condition-bug where prior we normally didn't set the `Context._result/._outcome_msg` in such cases. This is **precisely because** `.receive_nowait()` only returns the `pld` and when called from `.aclose()` this value is discarded, meaning so is its boxing `Return` despite consuming it from the underlying `._rx_chan`.. Longer term this should be solved differently by ensuring such races cases are handled at a higher scope like inside `Context._deliver_msg()` or the `Portal.open_context()` enter/exit blocks? Add a detailed warning note and todos for all this around the special case block! |
||
|---|---|---|
| .. | ||
| _testing | ||
| devx | ||
| experimental | ||
| msg | ||
| trionics | ||
| __init__.py | ||
| _child.py | ||
| _clustering.py | ||
| _context.py | ||
| _discovery.py | ||
| _entry.py | ||
| _exceptions.py | ||
| _forkserver_override.py | ||
| _ipc.py | ||
| _mp_fixup_main.py | ||
| _multiaddr.py | ||
| _portal.py | ||
| _root.py | ||
| _rpc.py | ||
| _runtime.py | ||
| _spawn.py | ||
| _state.py | ||
| _streaming.py | ||
| _supervise.py | ||
| log.py | ||
| to_asyncio.py | ||