FreeRDP
TestPoolThread.c
1 
2 #include <winpr/crt.h>
3 #include <winpr/pool.h>
4 
17 int TestPoolThread(int argc, char* argv[])
18 {
19  TP_POOL* pool = NULL;
20 
21  WINPR_UNUSED(argc);
22  WINPR_UNUSED(argv);
23 
24  if (!(pool = CreateThreadpool(NULL)))
25  {
26  printf("CreateThreadpool failed\n");
27  return -1;
28  }
29 
30  if (!SetThreadpoolThreadMinimum(pool, 8)) /* default is 0 */
31  {
32  printf("SetThreadpoolThreadMinimum failed\n");
33  return -1;
34  }
35 
36  SetThreadpoolThreadMaximum(pool, 64); /* default is 500 */
37 
38  CloseThreadpool(pool);
39 
40  return 0;
41 }