docs(worker): state that residual events are discarded after WorkerShutdown (mxaccessgw#183)
Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -1025,6 +1025,16 @@ Graceful shutdown sequence:
|
||||
If shutdown wedges, the gateway kills the process. The worker should be written
|
||||
so process kill does not corrupt other sessions.
|
||||
|
||||
**Residual events are discarded (v1 behavior).** The worker has no final event
|
||||
flush. The event-drain loop runs concurrently with the shutdown steps above, so
|
||||
events that it frames before the message loop exits are delivered, but the loop
|
||||
is cancelled as soon as the shutdown ack has been written and the message loop
|
||||
returns. Events still queued in the worker's event queue at that point, and any
|
||||
event raised after the ack, are discarded with the session; they are not framed
|
||||
and not sent to the gateway. A caller that needs the last events of a session
|
||||
must drain them (`DrainEvents`, or consume the event stream) before requesting
|
||||
shutdown.
|
||||
|
||||
### Ending the pipe read (net48)
|
||||
|
||||
Step 8 above cannot be done by cancellation. On .NET Framework 4.8
|
||||
|
||||
Reference in New Issue
Block a user