FreeRDP
TestPoolWork.c File Reference
#include <winpr/wtypes.h>
#include <winpr/crt.h>
#include <winpr/pool.h>
#include <winpr/interlocked.h>

Functions

static void CALLBACK test_WorkCallback (PTP_CALLBACK_INSTANCE instance, void *context, PTP_WORK work)
 
static BOOL test1 (void)
 
static BOOL test2 (void)
 
int TestPoolWork (int argc, char *argv[])
 

Variables

static LONG count = 0
 

Function Documentation

◆ test1()

static BOOL test1 ( void  )
static

You can post a work object one or more times (up to MAXULONG) without waiting for prior callbacks to complete. The callbacks will execute in parallel. To improve efficiency, the thread pool may throttle the threads.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test2()

static BOOL test2 ( void  )
static

See Remarks at https://msdn.microsoft.com/en-us/library/windows/desktop/ms682043(v=vs.85).aspx If there is a cleanup group associated with the work object, it is not necessary to call CloseThreadpoolWork ! calling the CloseThreadpoolCleanupGroupMembers function releases the work, wait, and timer objects associated with the cleanup group.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_WorkCallback()

static void CALLBACK test_WorkCallback ( PTP_CALLBACK_INSTANCE  instance,
void *  context,
PTP_WORK  work 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestPoolWork()

int TestPoolWork ( int  argc,
char *  argv[] 
)
Here is the call graph for this function:

Variable Documentation

◆ count

LONG count = 0
static