RtwqSetDeadline2 function (rtworkq.h)

Sets a deadline by which the work in a work queue must be completed.

Syntax

HRESULT RtwqSetDeadline2(
  [in]      DWORD    workQueueId,
  [in]      LONGLONG deadlineInHNS,
  [in]      LONGLONG preDeadlineInHNS,
  [in, out] HANDLE   *pRequest
);

Parameters

[in] workQueueId

The identifier for the work queue. The identifier is returned by the RtwqAllocateWorkQueue function.

[in] deadlineInHNS

The deadline for the work in the queue to be completed, in hundred-nanosecond units. For example, if deadlineInHNS is 9600, that represents 9600 hundred-nanoseconds, which is equal to 960 microseconds, or 0.96 milliseconds.

[in] preDeadlineInHNS

The pre-deadline for the work in the queue to be completed, in hundred-nanosecond units. For example, if preDeadlineInHNS is 9600, that represents 9600 hundred-nanoseconds, which is equal to 960 microseconds, or 0.96 milliseconds.

[in, out] pRequest

Receives a handle to the request that can be used to cancel the request by calling RtwqCancelDeadline.

Return value

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Update a deadline by creating a new deadline and releasing the old one.

Cancel a deadline by calling RtwqCancelDeadline.

Requirements

   
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header rtworkq.h
Library Rtworkq.lib
DLL RTWorkQ.dll

See also

RtwqCancelDeadline