class ThreadPool
{
The static const int MAX_THREADS=50;
The template & lt; Typename T>
Struct ThreadParam
{
Void (T: : * _function) (); T * _pobject;
ThreadParam (void (function) T: : * (), T * pobject)
: _function (function), _pobject (pobject) {}//what is the meaning of this part, for a great god explain
};
The template & lt; Typename T>
Struct ThreadParamEx
{
Void (T: : * _function) (ULONG_PTR); T * _pobject; ULONG_PTR _arg;
ThreadParamEx (void (T: : * function) (ULONG_PTR), T * pobject, ULONG_PTR arg)
: _function (function), _pobject (pobject), _arg (arg) {}
};
}
See a thread pool related procedures, there are many times will be the name of the structure inside the structure as a function again, what does it mean ah, behind: what
CodePudding user response:
This is a c + +, struct is equivalent to the class, the function and struct name is constructor