nsmcp::QuestionJobPoller object method wait (public)
nsmcp::QuestionJobPollerwait name json deadline emit poll [ check ]
Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl
Wait for a background tool job while reporting its progress. Allow at most one second for queued or running jobs to finish. Emit status and honor cancellation without restarting the original job.
- Parameters:
- name (required)
- Name of the configured or registered item to resolve.
- json (required)
- Serialized JSON supplied by the backend transport.
- deadline (required)
- Absolute deadline in clock milliseconds.
- emit (required)
- Event callback prefix; returning false requests cancellation.
- poll (required)
- Callback prefix invoked with a retained background-job handle.
- check (optional)
- Optional callback used to check cancellation or other turn constraints.
- Returns:
- Final evidence or the latest retained-job JSON when still pending; ordinary non-job results pass through unchanged.
- Testcases:
- No testcase defined.
![[i]](/resources/acs-subsite/ZoomIn16.gif)