mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-03-10 08:51:19 +00:00
Replace LinkedBlockingQueue with LinkedTransferQueue in worker-pool
Signed-off-by: Radim Vansa <rvansa@redhat.com>
This commit is contained in:
@@ -152,8 +152,10 @@ public class VertxImpl implements VertxInternal, MetricsProvider {
|
||||
|
||||
metrics = initialiseMetrics(options);
|
||||
|
||||
ExecutorService workerExec = Executors.newFixedThreadPool(options.getWorkerPoolSize(),
|
||||
new VertxThreadFactory("vert.x-worker-thread-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
|
||||
int workerPoolSize = options.getWorkerPoolSize();
|
||||
ExecutorService workerExec = new ThreadPoolExecutor(workerPoolSize, workerPoolSize,
|
||||
0L, TimeUnit.MILLISECONDS, new LinkedTransferQueue<>(),
|
||||
new VertxThreadFactory("vert.x-worker-thread-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
|
||||
PoolMetrics workerPoolMetrics = metrics != null ? metrics.createPoolMetrics("worker", "vert.x-worker-thread", options.getWorkerPoolSize()) : null;
|
||||
ExecutorService internalBlockingExec = Executors.newFixedThreadPool(options.getInternalBlockingPoolSize(),
|
||||
new VertxThreadFactory("vert.x-internal-blocking-", checker, true, options.getMaxWorkerExecuteTime(), options.getMaxWorkerExecuteTimeUnit()));
|
||||
|
||||
Reference in New Issue
Block a user