Thread pool implementation
no vote
Class Pool manages requests from clients.
management is storing requests in a priority queue and executing them in paralel.
the maximum number of executed requests in paralel is max - variable of ctor.
Run function opens a new thread called the main thread, which does the management.
Enqueue function adds a new request to a pool, this function is thread safe.
Wait function is blocking until all(or spesific request) requests are ended.