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
@@ -12,7 +12,7 @@ namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;
/// </summary>
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);
/// <summary>
@@ -212,12 +212,12 @@ public sealed class MxAccessValueCache
/// <see cref="StaWaitHelper.WaitForSignalOrMessages"/> rather than
/// <c>Thread.Sleep</c>: a sleeping STA pumps no Windows messages, so a
/// ReadBulk waiting on the first OnDataChange would only dispatch it at
/// poll-tick granularity — and it holds the apartment for up to
/// <c>timeout_ms</c> per tag, stalling every other COM event with it. The
/// poll-tick granularity — and it holds the apartment for up to 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
/// is recorded from another thread), so the apartment keeps dispatching
/// continuously for the whole wait. The per-tag timeout, the deadline
/// math, and both return shapes are unchanged.
/// continuously for the whole wait. The timeout (one deadline shared by the
/// whole ReadBulk command), the deadline math, and both return shapes are unchanged.
/// </remarks>
/// <param name="serverHandle">MXAccess server handle.</param>
/// <param name="itemHandle">MXAccess item handle.</param>