docs(worker): ReadBulk timeout comments describe one shared deadline (mxaccessgw#179)
Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
@@ -243,7 +243,7 @@ public sealed class MxAccessValueCacheTests
|
||||
/// 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
|
||||
/// 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>
|
||||
[Fact]
|
||||
public void TryWaitForUpdate_KeepsPumping_WhenPollIntervalExceedsTheFallbackTick()
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user