101bda70739b4ecc8a30156ab86f3c9cee188006
GetReadyWorkerClientAsync re-read the session and worker states every 25 ms until the WorkerReadyWaitTimeoutMs deadline. It now waits on two TaskCompletionSource signals - one completed by every GatewaySession _state / _workerClient write, one by every WorkerClient _state write - and re-evaluates only when one fires or the remaining budget elapses. Both signals are captured under the lock before the state is evaluated, so a transition between the evaluation and the await is not lost. IWorkerClient gains GetStateChangedSignal(), a default interface member that returns null; a client without a signal (the test fakes) is re-read on the old 25 ms interval, so the fakes need no change. The production WorkerClient always publishes one. Default behaviour (WorkerReadyWaitTimeoutMs = 0, fail fast) is unchanged. Regression tests (SessionManagerTests): ...WakesWithoutPollTimer and ...FailsFastWithoutPollTimer never advance the FakeTimeProvider, so they hang and fail against the poll loop; WorkerClientTests.GetStateChangedSignal_ CompletesOnEachTransition pins the worker-side signal. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
Description
No description provided
Languages
C#
50.8%
Java
37.1%
Python
3%
Rust
2.9%
Go
2.5%
Other
3.6%