blob: 4021636b5526e09f799d28d7c2ee144da1c5d647 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "async_queue.h"
namespace NYql {
TAsyncQueue::TAsyncQueue(size_t numThreads, const TString& poolName) {
if (1 == numThreads) {
MtpQueue_.Reset(new TFakeThreadPool());
} else {
MtpQueue_.Reset(new TSimpleThreadPool(TThreadPoolParams{poolName}));
}
MtpQueue_->Start(numThreads);
}
TAsyncQueue::TPtr TAsyncQueue::Make(size_t numThreads, const TString& poolName) {
return new TAsyncQueue(numThreads, poolName);
}
}
|