Starts the async executor
13998
public void start() {
    if (isActive) {
      return;
    }

    log.info("Starting up the default async job executor [{}].", getClass().getName());
    
    if (timerJobRunnable == null) {
      timerJobRunnable = new AcquireTimerJobsRunnable(this, processEngineConfiguration.getJobManager());
    }
    
    if (resetExpiredJobsRunnable == null) {
      resetExpiredJobsRunnable = new ResetExpiredJobsRunnable(this);
    }
    
    if (!isMessageQueueMode && asyncJobsDueRunnable == null) {
      asyncJobsDueRunnable = new AcquireAsyncJobsDueRunnable(this);
    }
    
    if (!isMessageQueueMode) {
      initAsyncJobExecutionThreadPool();
      startJobAcquisitionThread();
    }
    
    startTimerAcquisitionThread();
    startResetExpiredJobsThread();

    isActive = true;

    executeTemporaryJobs();
  }
357414
def start(self):
        """"""
        if self.num_workers:
            self.queue = Queue(maxsize=self.num_workers)
            self.workers = [_Worker(self) for _ in range(self.num_workers)]
            for worker in self.workers:
                worker.start()
        self.running = True
65009
public void start(ExecutorService executorService, Callable<Future<R>> innerTask, ThreadContextDescriptor threadContext) {
        synchronized (this) {
            this.innerTask = innerTask;
            this.threadContext = threadContext;
            //set up the future to hold the result
            this.resultFuture = new CompletableFuture<Future<R>>();
            //submit the innerTask (wrapped by this) for execution
            this.taskFuture = executorService.submit(this);
        }
    }
678778
public void start() {
		if (tryToStart()) {
			throw new IllegalStateException("The StreamServer is already started");
		}
		logger.debug("StreamServer starting {}:{}", serverSocket.getInetAddress(), serverSocket.getLocalPort());
		keepRunning.set(true);
		executor.submit(new Server());
	}
89253
async def _start_async_tasks(self):
        """"""
        try:
            self.udisks = await udiskie.udisks2.Daemon.create()
            results = await self._init()
            return 0 if all(results) else 1
        except Exception:
            traceback.print_exc()
            return 1
        finally:
            self.mainloop.quit()
1157015
def start(self):
        
        if not self.started:
            self.started = True
            self.executor = ThreadPoolExecutor(max_workers=32)
            self.poller = self.executor.submit(self.poll_events)
        else:
            raise IllegalStateError("Dispatcher is already started.")
400586
synchronized void startFlusher()
  {
    // Create a new scheduled executor service with a threadfactory that
    // creates daemonized threads; this way if the user doesn't exit nicely
    // the JVM Runtime won't hang
    flusher =
        Executors.newScheduledThreadPool(1,
                                         new ThreadFactory()
                                         {
                                           @Override
                                           public Thread newThread(Runnable r)
                                           {
                                             Thread t =
                                                 Executors.defaultThreadFactory().newThread(r);
                                             t.setDaemon(true);
                                             return t;
                                           }
                                         });

    flusher.scheduleWithFixedDelay(new QueueFlusher(),
                                   0,
                                   flushPeriodMs,
                                   TimeUnit.MILLISECONDS);
  }
1140528
private static synchronized ExecutorService initAsyncExecutorService() {
		if (ASYNC_EXECUTOR_SERVICE == null) {
			ASYNC_EXECUTOR_SERVICE = java.util.concurrent.Executors.newSingleThreadExecutor(
				new ThreadFactory() {
					public Thread newThread(Runnable r) {
						Thread thread = new Thread(r, "javasimon-async");
						thread.setDaemon(true);
						return thread;
					}
				});
		}
		return ASYNC_EXECUTOR_SERVICE;
	}
476040
def start(self):
        
        self.__stop = False
        self._queue.start()
        self._zk.start()
973966
@Override
    public void start(Supplier<ExecutorService> executorFactory) throws IOException
    {
        future = executorFactory.get().submit(this);
    }
1140747
public void start() {
        connector.registerConnectorListener(this::onCommandReceived);
        connector.registerConnectionChangeListener(this::onConnectionChange);
        connector.start();
        executor.scheduleAtFixedRate(this::checkHeartbeat, 1000, 1000, TimeUnit.MILLISECONDS);
    }
1179881
async def executor(func, *args, **kwargs):
    '''
    
    '''
    def syncfunc():
        return func(*args, **kwargs)

    loop = asyncio.get_running_loop()
    return await loop.run_in_executor(None, syncfunc)
715544
def run(self):
        '''
        
        '''
        self.thread = Thread(target=self.__processQueue)
        self.thread.start()
1365594
async def init(self) -> None:
        ''''''

        self.stats = await self.insert(self.stats)
        self.configuration = await self.insert(self.configuration)

        if not self.executor:
            try:
                max_workers = self.config.get('executor_workers')
            except Exception:
                max_workers = None

            self.executor = ThreadPoolExecutor(max_workers=max_workers)

        for task in self.initial_tasks:
            await self.insert(task)

        self.monitor = asyncio.ensure_future(self.monitor_tasks())
        self.counters['alive_since'] = time.time()
1229218
def run(self):
        """"""
        # Create the thread pool.
        executor = concurrent.futures.ThreadPoolExecutor(
            max_workers=self._config['num_workers'])

        # Wait to ensure multiple senders can be synchronised.
        now = int(datetime.datetime.utcnow().timestamp())
        start_time = ((now + 29) // 30) * 30
        self._log.info('Waiting until {}'.format(
                       datetime.datetime.fromtimestamp(start_time)))
        while int(datetime.datetime.utcnow().timestamp()) < start_time:
            time.sleep(0.1)

        # Run the event loop.
        loop = asyncio.get_event_loop()
        try:
            loop.run_until_complete(self._run_loop(executor))
        except KeyboardInterrupt:
            pass
        finally:
            # Send the end of stream message to each stream.
            self._log.info('Shutting down, closing streams...')
            tasks = []
            for stream, item_group in self._streams:
                tasks.append(stream.async_send_heap(item_group.get_end()))
            loop.run_until_complete(asyncio.gather(*tasks))
            self._log.info('... finished.')
            executor.shutdown()
484875
public void start() {

        logger.entering();

        if (bStartSession) {
            throw new IllegalStateException("WebDriverSessionHandler is already started");
        }

        bStartSession = true;

        result = Executors.newSingleThreadExecutor().submit(webDriverCaller);
        logger.exiting();

    }
877245
public void start() {
        if(actionInBackground != null) {

            Runnable jobToRun = new Runnable() {
                @Override
                public void run() {
                    result = (JobResult) actionInBackground.doAsync();
                    onResult();
                }
            };

            if(getExecutorService() != null) {
               asyncFutureTask = (FutureTask) getExecutorService().submit(jobToRun);
            } else {
                asyncThread = new Thread(jobToRun);
                asyncThread.start();
            }
        }
    }