RtlQueueWorkItem(3w)

RtlQueueWorkItem3w

Usage

NTSTATUS RtlQueueWorkItem
(
PRTL_WORK_ITEM_ROUTINE Function,
PVOID Context,
ULONG Flags
)

Overview

Queues a work item into a thread in the thread pool.

Params

Function [In] Work function to execute.

Context [In] Context to pass to the work function when it is executed.

Flags [In] Flags. See notes.

Returns

Success: STATUS_SUCCESS.

Failure: Any NTSTATUS code.

Notes

Flags can be one or more of the following:
WT_EXECUTEDEFAULT - Executes the work item in a non-I/O worker thread.
WT_EXECUTEINIOTHREAD - Executes the work item in an I/O worker thread.
WT_EXECUTEINPERSISTENTTHREAD - Executes the work item in a thread that is persistent.
WT_EXECUTELONGFUNCTION - Hints that the execution can take a long time.
WT_TRANSFER_IMPERSONATION - Executes the function with the current access token.

Implementation

Declared in "winternl.h".

Implemented in "dlls/ntdll/threadpool.c".

Debug channel "threadpool".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.