docs(worker): ReadBulk timeout comments describe one shared deadline (mxaccessgw#179)
ci / nightly-windev (push) Has been skipped
ci / windows-x86 (push) Successful in 1m25s
ci / java (push) Successful in 2m16s
ci / portable (push) Failing after 4m31s

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 12:32:13 -05:00
parent 9906d7e57c
commit f829df8087
3 changed files with 6 additions and 6 deletions
@@ -243,7 +243,7 @@ public sealed class MxAccessValueCacheTests
/// fallback tick, so a timing-out wait still pumps repeatedly instead of /// fallback tick, so a timing-out wait still pumps repeatedly instead of
/// once. This is what keeps the STA dispatching COM events in a process /// once. This is what keeps the STA dispatching COM events in a process
/// whose message queue never wakes the wait, and it is the safety net /// whose message queue never wakes the wait, and it is the safety net
/// behind the ReadBulk per-tag timeout. /// behind the ReadBulk shared-deadline timeout.
/// </summary> /// </summary>
[Fact] [Fact]
public void TryWaitForUpdate_KeepsPumping_WhenPollIntervalExceedsTheFallbackTick() public void TryWaitForUpdate_KeepsPumping_WhenPollIntervalExceedsTheFallbackTick()
@@ -12,7 +12,7 @@ namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;
/// </summary> /// </summary>
public sealed class MxAccessCommandExecutor : IStaCommandExecutor public sealed class MxAccessCommandExecutor : IStaCommandExecutor
{ {
/// <summary>Default per-tag timeout used when <c>ReadBulkCommand.timeout_ms</c> is zero.</summary> /// <summary>Default timeout used when <c>ReadBulkCommand.timeout_ms</c> is zero. It is one deadline shared by the whole command, not a per-tag budget.</summary>
internal static readonly TimeSpan DefaultReadBulkTimeout = TimeSpan.FromMilliseconds(1000); internal static readonly TimeSpan DefaultReadBulkTimeout = TimeSpan.FromMilliseconds(1000);
/// <summary> /// <summary>
@@ -212,12 +212,12 @@ public sealed class MxAccessValueCache
/// <see cref="StaWaitHelper.WaitForSignalOrMessages"/> rather than /// <see cref="StaWaitHelper.WaitForSignalOrMessages"/> rather than
/// <c>Thread.Sleep</c>: a sleeping STA pumps no Windows messages, so a /// <c>Thread.Sleep</c>: a sleeping STA pumps no Windows messages, so a
/// ReadBulk waiting on the first OnDataChange would only dispatch it at /// ReadBulk waiting on the first OnDataChange would only dispatch it at
/// poll-tick granularity — and it holds the apartment for up to /// poll-tick granularity — and it holds the apartment for up to the
/// <c>timeout_ms</c> per tag, stalling every other COM event with it. The /// ReadBulk <c>timeout_ms</c> deadline, stalling every other COM event with it. The
/// Win32 wait returns the instant a message needs pumping (or the value /// Win32 wait returns the instant a message needs pumping (or the value
/// is recorded from another thread), so the apartment keeps dispatching /// is recorded from another thread), so the apartment keeps dispatching
/// continuously for the whole wait. The per-tag timeout, the deadline /// continuously for the whole wait. The timeout (one deadline shared by the
/// math, and both return shapes are unchanged. /// whole ReadBulk command), the deadline math, and both return shapes are unchanged.
/// </remarks> /// </remarks>
/// <param name="serverHandle">MXAccess server handle.</param> /// <param name="serverHandle">MXAccess server handle.</param>
/// <param name="itemHandle">MXAccess item handle.</param> /// <param name="itemHandle">MXAccess item handle.</param>