presto-main/src/main/java/io/prestosql/dispatcher/DispatchExecutor.java/DispatchExecutor/DispatchExecutor
class DispatchExecutor:    @Inject
    public DispatchExecutor(QueryManagerConfig config, EmbedVersion embedVersion)
    {
        ExecutorService coreExecutor = newCachedThreadPool(daemonThreadsNamed("dispatcher-query-%s"));
        closer.register(coreExecutor::shutdownNow);
        executor = new DecoratingListeningExecutorService(
                listeningDecorator(coreExecutor),
                new DecoratingListeningExecutorService.TaskDecorator()
                {
                    @Override
                    public Runnable decorate(Runnable command)
                    {
                        return embedVersion.embedVersion(command);
                    }

                    @Override
                    public <T> Callable<T> decorate(Callable<T> task)
                    {
                        return embedVersion.embedVersion(task);
                    }
                });

        ScheduledExecutorService coreScheduledExecutor = newScheduledThreadPool(config.getQueryManagerExecutorPoolSize(), daemonThreadsNamed("dispatch-executor-%s"));
        closer.register(coreScheduledExecutor::shutdownNow);
        scheduledExecutor = listeningDecorator(coreScheduledExecutor);

        mbeans = new DispatchExecutorMBeans(coreExecutor, coreScheduledExecutor);
    }