diff --git a/docs/MxAccessWorkerInstanceDesign.md b/docs/MxAccessWorkerInstanceDesign.md index 77b6fa7..936601d 100644 --- a/docs/MxAccessWorkerInstanceDesign.md +++ b/docs/MxAccessWorkerInstanceDesign.md @@ -251,7 +251,7 @@ The loop should update a heartbeat timestamp after: - processing an MXAccess event. `StaRuntime` implements this runtime boundary in the worker. It starts one -background thread named `ZB.MOM.WW.MxGateway.Worker.STA`, sets it to `ApartmentState.STA`, +background thread named `MxGateway.Worker.STA`, sets it to `ApartmentState.STA`, initializes COM through `StaComApartmentInitializer`, and runs `StaMessagePump`. Commands are scheduled through `InvokeAsync`; the command queue signals an `AutoResetEvent` so `MsgWaitForMultipleObjectsEx` can wake the @@ -650,8 +650,8 @@ Heartbeat payload includes: `MxAccessStaSession.CaptureHeartbeat()` reads `StaRuntime.LastActivityUtc` and `StaCommandDispatcher` queue state without touching the raw MXAccess COM object -outside the STA. Event queue depth and event sequence are reported as zero until -the event queue implementation owns those counters. +outside the STA. Event queue depth (`eventQueue.Count`) and event sequence +(`eventQueue.LastEventSequence`) are populated from the live event queue. The STA watchdog currently emits a `WorkerFault` with `WorkerFaultCategory.StaHung` when `LastStaActivityUtc` is older than diff --git a/docs/WorkerSta.md b/docs/WorkerSta.md index 8c04661..8d20685 100644 --- a/docs/WorkerSta.md +++ b/docs/WorkerSta.md @@ -20,13 +20,13 @@ The installed MXAccess interop assembly declares an `Apartment` threading model ## STA Thread Initialization -`StaRuntime`'s constructor configures a background `Thread` named `ZB.MOM.WW.MxGateway.Worker.STA` and forces it into `ApartmentState.STA` before the thread starts. `Start()` releases the thread and then blocks on `startedEvent` so callers observe a fully-initialized apartment (or a captured `startupException`) before the first `InvokeAsync` call: +`StaRuntime`'s constructor configures a background `Thread` named `MxGateway.Worker.STA` and forces it into `ApartmentState.STA` before the thread starts. `Start()` releases the thread and then blocks on `startedEvent` so callers observe a fully-initialized apartment (or a captured `startupException`) before the first `InvokeAsync` call: ```csharp staThread = new Thread(ThreadMain) { IsBackground = true, - Name = "ZB.MOM.WW.MxGateway.Worker.STA" + Name = "MxGateway.Worker.STA" }; staThread.SetApartmentState(ApartmentState.STA); ``` diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 1794c05..a9a856a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -9,6 +9,31 @@ true + + + 0.1.2 + + + + + + + + $(_StampedGitSha.Trim()) + + +