Starts this task queue. Allows {@link #add(Task)} to accept new tasks.
338632
@LifecycleStart
  public void start()
  {
    giant.lock();

    try {
      Preconditions.checkState(!active, "queue must be stopped");
      active = true;
      syncFromStorage();
      managerExec.submit(
          new Runnable()
          {
            @Override
            public void run()
            {
              while (true) {
                try {
                  manage();
                  break;
                }
                catch (InterruptedException e) {
                  log.info("Interrupted, exiting!");
                  break;
                }
                catch (Exception e) {
                  final long restartDelay = config.getRestartDelay().getMillis();
                  log.makeAlert(e, "Failed to manage").addData("restartDelay", restartDelay).emit();
                  try {
                    Thread.sleep(restartDelay);
                  }
                  catch (InterruptedException e2) {
                    log.info("Interrupted, exiting!");
                    break;
                  }
                }
              }
            }
          }
      );
      ScheduledExecutors.scheduleAtFixedRate(
          storageSyncExec,
          config.getStorageSyncRate(),
          new Callable<ScheduledExecutors.Signal>()
          {
            @Override
            public ScheduledExecutors.Signal call()
            {
              try {
                syncFromStorage();
              }
              catch (Exception e) {
                if (active) {
                  log.makeAlert(e, "Failed to sync with storage").emit();
                }
              }
              if (active) {
                return ScheduledExecutors.Signal.REPEAT;
              } else {
                return ScheduledExecutors.Signal.STOP;
              }
            }
          }
      );
      managementMayBeNecessary.signalAll();
    }
    finally {
      giant.unlock();
    }
  }
1066653
public void postTask( Runnable task )
  {
    synchronized( _queue )
    {
      _queue.add( task );

      if( !isAlive() )
      {
        start();
      }

      _queue.notifyAll();
    }
  }
815849
public void start(boolean block) throws KeeperException, InterruptedException, ExecutionException
    {
        Future<?> task = start();
        if (block) {
            task.get();
        }
    }
738066
private void runSelectTask()
  {
    if (_lifecycle.isActive() || _lifecycle.isAfterStopping()) {
      log.warning(this + " cannot start because an instance is active");
      return;
    }

    initNative(_fd);

    synchronized (_thread) {
      _thread.notify();
    }

    if (! _lifecycle.toActive()) {
      log.warning(this + " invalid starting state");
      return;
    }

    runImpl();
  }
486903
public synchronized void start() {
    if (!running) {
      running = true;
      Thread t = new Thread(new CpuStatRunnable(), "ThreadCpuStatsCollector");
      t.setDaemon(true);
      t.start();
    }
  }
801106
@Override
  public synchronized void start() {
    if (thread != null) {
      throw new IllegalThreadStateException("Parser already started");
    }

    String name = getThreadName() + "(" + getUri().toString() + ")";

    CountDownLatch startSignal = new CountDownLatch(1);
    Runnable runnable = getRunnable(startSignal);

    thread = new Thread(runnable, name);
    thread.start();

    // Block until the thread has started
    try {
      startSignal.await();
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
  }
221668
public void run() {
        try {

            Queue<ParallelTask> waitQ = ParallelTaskManager.getInstance()
                    .getWaitQ();

            logger.debug(
                    "TASK_WAIT_Q: Current waitQ has task count: {} in Thread scheduler",
                    waitQ.size());

            final ParallelTask task = waitQ.peek();
            if (task != null) {

                int totalUsedCapacityBefore = ParallelTaskManager.getInstance()
                        .getTotalUsedCapacity();

                int capacityThisTask = task.capacityUsed();
                int capacityRemain = ParallecGlobalConfig.maxCapacity
                        - totalUsedCapacityBefore;
                int totalUsedCapacityNew = totalUsedCapacityBefore
                        + capacityThisTask;

                logger.info(
                        "TASK_WAIT_Q: Exists Task in WaitQ with head of queue task id {}"
                                + "....Current used capacity {}, and remaining capacity is {}",
                        task.getTaskId(), totalUsedCapacityBefore,
                        capacityRemain);
                // condition to add to the in progress map
                if (totalUsedCapacityNew <= ParallecGlobalConfig.maxCapacity) {
                    logger.info(
                            "TASK_WAIT_Q: Sufficent capacity. Execute new task from wait queue. Task capacity {}"
                                    + " with total used capacity is now {}, capacityRemain will be {}",
                            capacityThisTask, totalUsedCapacityNew,
                            ParallecGlobalConfig.maxCapacity
                                    - totalUsedCapacityNew);

                    waitQ.poll(); // dequeue
                    Runnable taskRunnable = new Runnable() {
                        @Override
                        public void run() {
                            ParallelTaskManager.getInstance()
                                    .generateUpdateExecuteTask(task);
                        }
                    };
                    new Thread(taskRunnable).start();
                } else {
                    logger.info(
                            "TASK_WAIT_Q: Skip execution new task. Insufficent capacity. "
                                    + "Head of queue task needs capacity {}. However capacityRemain is only {}.",
                            capacityThisTask, capacityRemain);
                }

            }

        } catch (Exception e) {
            logger.error("TASK_WAIT_Q: fail in EvalTaskInWaitQRunner ", e);
        }
    }
985603
public void start() {
        FixedSchedulerPool update = new FixedSchedulerPool(poolSize);
        if (!pool.compareAndSet(NONE, update)) {
            update.shutdown();
        }
    }
639324
async def start(self):
        

        self._loop.add_task(self._periodic_loop, name="periodic task for %s" % self._adapter.__class__.__name__,
                            parent=self._task)

        self._adapter.add_callback('on_scan', functools.partial(_on_scan, self._loop, self))
        self._adapter.add_callback('on_report', functools.partial(_on_report, self._loop, self))
        self._adapter.add_callback('on_trace', functools.partial(_on_trace, self._loop, self))
        self._adapter.add_callback('on_disconnect', functools.partial(_on_disconnect, self._loop, self))
588125
public void start(String taskName) throws IllegalStateException {
        this.lastTaskInfo = new TaskInfo(taskName, System.currentTimeMillis());
        this.runningTasks.push(lastTaskInfo);
        ++this.taskCount;
        this.running = true;
        this.currentTaskName = taskName;
    }
275879
public static synchronized void start() {
        if(status.equals("started"))
            return;
        init();

        long t = System.currentTimeMillis();

        Transactions.clear();
        queueWorker.clear();
        operationLog.initialize();
        messageListener.start();

        //find not
        operationLog.listUndone(new Closure<MessageBean, Object>() {
            @Override
            public Object call(MessageBean input) {
                try{
                    queueWorker.runRealWrite(input);
                    operationLog.markDone(input.getId());
                }catch (Throwable e){
                    queueWorker.onError(input, e);
                }
                return null;
            }
        });
        //update
        startupUpdator.update(queueWorker);
        queueWorker.start();
        startupUpdator.start();
        try{
            fileExchange.start();
        }catch (BindException e){
            LOG.error("Cannot start file exchange capability, BindException occurs: "+e.getMessage());
            System.exit(1);
        }

        status = "started";
        LOG.info("Cluster node "+nodeId+" started ("+(System.currentTimeMillis()-t)+" ms.)");
    }
1030388
def start_task(self, task):
        
        self.info("Calculating {}...".format(task))
        self.tasks[task] = self.timer()
131564
def start(self, *args, **kwargs):
        
        wait = kwargs.pop("wait", False)

        # Initial setup
        self._setup(*args, **kwargs)

        # Build dirs and files.
        self.build(*args, **kwargs)

        # Submit tasks (does not block)
        self.submit_tasks(wait=wait)
145119
public void start() {
        addSymbolsFromSettings();
        File rep = new File(context.getSettings().getTargetPath());
        rep.mkdirs();
        try {
            java4cppLog = new FileWriter(new File(getPath(JAVA4CPP_LOG)));
        } catch (IOException e) {
            System.err.println("Can't create log file: " + e.getMessage());
        }
        try {
            File[] existings = rep.listFiles(new SourceFilter());
            if (existings != null) {
                oldFiles = new ArrayList<File>(Arrays.asList(existings));
            }
            java4cppHash = new File(getPath(JAVA4CPP_HASH));
            BufferedInputStream in = new BufferedInputStream(new FileInputStream(java4cppHash));
            oldHashes.load(in);
            in.close();
            java4cppHash.delete();
        } catch (IOException e) {
            logInfo("no java4cpp.hash file, regenerating all files");
        }
    }
793048
def add(self, task):
        
        wait_id = task.wait_for_task_id
        task_list = self.wait_id_to_task.get(wait_id, [])
        task_list.append(task)
        self.wait_id_to_task[wait_id] = task_list
295010
@Override
    public void start(boolean block) throws InterruptedException, ExecutionException {
        Future<?> task = m_es.submit(new ParentEvent(null));
        if (block) {
            task.get();
        }
    }
88476
def insert(self):
        
        from google.appengine.api.taskqueue import Queue

        task = self.to_task()

        Queue(name=self.get_queue()).add(task)