DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
ThreadPool.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "Common.h"
7#include "System/Object.h"
8#include "System/Action.h"
10
11namespace DotNetDupe {
12 namespace System {
13 namespace Threading {
14
17
25 class ThreadPool : public Object {
26 public:
30 DOTNETDUPE_API static bool QueueUserWorkItem(WaitCallback callback);
31
36 DOTNETDUPE_API static bool QueueUserWorkItem(WaitCallback callback, Object* pState);
37
41 DOTNETDUPE_API static bool SetMinThreads(int iMinThreads);
42
43 private:
44 // Strictly static class
45 ThreadPool() = delete;
46 };
47 }
48 }
49}
Encapsulates a delegate method that has parameters and returns void.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
Encapsulates a method that has parameters and does not return a value.
Definition Action.h:46
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
static bool SetMinThreads(int iMinThreads)
Sets the minimum number of threads the thread pool creates on demand as new requests are made.
static bool QueueUserWorkItem(WaitCallback callback)
Queues a method for execution. The method executes when a thread pool thread becomes available.
Action< Object * > WaitCallback
Represents a callback method to be executed by a thread pool thread.
Definition ThreadPool.h:16