/*
Submit a task asynchronously to the thread to preserve message order,
and wait for the task to complete.
356022
private void submit(final Level level, final Object message, final Throwable t) {
        if (!m_logger.isEnabledFor(level)) return;

        if (m_asynchLoggerPool == null) {
            m_logger.log(level, message, t);
            return;
        }

        final Runnable runnableLoggingTask = createRunnableLoggingTask(level, message, t);
        try {
            m_asynchLoggerPool.submit(runnableLoggingTask).get();
        } catch (Exception e) {
            Throwables.propagate(e);
        }
    }
829366
@Override
    protected void submit(StaplerRequest req) throws ServletException, FormException, IOException {
        JSONObject json = req.getSubmittedForm();
        synchronized (this) {
            recurse = json.optBoolean("recurse", true);
            jobNames.clear();
            Iterable<? extends TopLevelItem> items;
            if (recurse) {
                items = getOwner().getItemGroup().getAllItems(TopLevelItem.class);
            } else {
                items = getOwner().getItemGroup().getItems();
            }
            for (TopLevelItem item : items) {
                String relativeNameFrom = item.getRelativeNameFrom(getOwner().getItemGroup());
                if(req.getParameter(relativeNameFrom)!=null) {
                    jobNames.add(relativeNameFrom);
                }
            }
        }

        setIncludeRegex(req.getParameter("useincluderegex") != null ? req.getParameter("includeRegex") : null);

        if (columns == null) {
            columns = new DescribableList<>(this);
        }
        columns.rebuildHetero(req, json, ListViewColumn.all(), "columns");
        
        if (jobFilters == null) {
        	jobFilters = new DescribableList<>(this);
        }
        jobFilters.rebuildHetero(req, json, ViewJobFilter.all(), "jobFilters");

        String filter = Util.fixEmpty(req.getParameter("statusFilter"));
        statusFilter = filter != null ? "1".equals(filter) : null;
    }
240644
void submit() {

        if (isValid()) {
            if (m_project == null) {
                createProject();
            } else {
                saveProject();
            }
            m_table.loadProjects();
            m_window.close();
        }
    }
1143586
void submit(final LoadAndDisplayImageTask task) {
		taskDistributor.execute(new Runnable() {
			@Override
			public void run() {
				File image = configuration.diskCache.get(task.getLoadingUri());
				boolean isImageCachedOnDisk = image != null && image.exists();
				initExecutorsIfNeed();
				if (isImageCachedOnDisk) {
					taskExecutorForCachedImages.execute(task);
				} else {
					taskExecutor.execute(task);
				}
			}
		});
	}
966912
public synchronized void submitOperation(int requestId, AsyncOperation operation) {
        if(this.operations.containsKey(requestId))
            throw new VoldemortException("Request " + requestId
                                         + " already submitted to the system");

        this.operations.put(requestId, operation);
        scheduler.scheduleNow(operation);
        logger.debug("Handling async operation " + requestId);
    }
769611
void submit() {

        try {
            CmsProject project = m_context.getCms().readProject((CmsUUID)m_projectComboBox.getValue());
            if (!m_context.getCms().getRequestContext().getCurrentProject().equals(project)) {
                A_CmsUI.get().changeProject(project);
            } else {
                project = null;
            }
            String siteRoot = (String)m_siteComboBox.getValue();
            if (!m_context.getCms().getRequestContext().getSiteRoot().equals(siteRoot)) {
                A_CmsUI.get().changeSite(siteRoot);
            } else {
                siteRoot = null;
            }
            if ((siteRoot != null) && CmsFileExplorerConfiguration.APP_ID.equals(m_context.getAppId())) {
                I_CmsWorkplaceAppConfiguration editorConf = OpenCms.getWorkplaceAppManager().getAppConfiguration(
                    CmsPageEditorConfiguration.APP_ID);
                if (editorConf.getVisibility(m_context.getCms()).isActive()) {
                    ((I_CmsHasAppLaunchCommand)editorConf).getAppLaunchCommand().run();
                    return;
                }
            }
            m_context.finish(project, siteRoot);
        } catch (CmsException e) {
            m_context.error(e);
        }
    }
966152
void submit() {

        CmsResource target = m_context.getResources().get(0);
        String resPath = m_context.getCms().getSitePath(target);
        try {
            m_context.getCms().copyResourceToProject(resPath);

            m_context.finish(Collections.singletonList(target.getStructureId()));
        } catch (CmsException e) {
            m_context.error(e);
        }
    }
1252006
private void submit(final ActiveContext context) {
    try {
      LOG.log(Level.INFO, "Send task to context: {0}", new Object[]{context});
      if (JobDriver.this.handlerManager.getActiveContextHandler() == 0) {
        throw new RuntimeException("Active Context Handler not initialized by CLR.");
      }
      final ActiveContextBridge activeContextBridge = activeContextBridgeFactory.getActiveContextBridge(context);
      NativeInterop.clrSystemActiveContextHandlerOnNext(JobDriver.this.handlerManager.getActiveContextHandler(),
          activeContextBridge, JobDriver.this.interopLogger);
    } catch (final Exception ex) {
      LOG.log(Level.SEVERE, "Fail to submit task to active context");
      context.close();
      throw new RuntimeException(ex);
    }
  }
571253
public static<T> Future<T> submit(Callable<T> task, String message) {
		logger.debug("Task " + (++tasks) + " submitted to shared thread pool. " + message);
		return getThreadPool().submit(task);
	}
1320809
@Override
    public Observable<HttpClientResponse<O>> submit(HttpClientRequest<I> request) {
        return submit(request, null, null);
    }
509609
private synchronized void runTask(Task task) {
        if (taskThread == null) {
            taskThread = new TaskThread();
        }
        taskThread.runTask(task);
    }
565295
void afterWrite(Runnable task) {
        writeBuffer.add(task);
        drainStatus.lazySet(REQUIRED);
        tryToDrainBuffers();
        notifyListener();
    }
1255259
public Future<V> submit(Callable<V> task) {
        if (task == null) throw new NullPointerException();
        NotifyingFuture<V> f = executor.submit(task);
        f.setListener(listener);
        return f;
    }
141552
protected synchronized void submit() {
    try {
      if (theJobConf.getBoolean("create.empty.dir.if.nonexist", false)) {
        FileSystem fs = FileSystem.get(theJobConf);
        Path inputPaths[] = FileInputFormat.getInputPaths(theJobConf);
        for (int i = 0; i < inputPaths.length; i++) {
          if (!fs.exists(inputPaths[i])) {
            try {
              fs.mkdirs(inputPaths[i]);
            } catch (IOException e) {

            }
          }
        }
      }
      RunningJob running = jc.submitJob(theJobConf);
      this.mapredJobID = running.getID();
      this.state = Job.RUNNING;
    } catch (IOException ioe) {
      this.state = Job.FAILED;
      this.message = StringUtils.stringifyException(ioe);
    }
  }
38754
public void submit(final Metric metric) {
		if (metric != null) {
			LOGGER.debug("Collecting metric: {}", metric);
			queue.offer(metric);
		}
	}
658177
public Future<?> submitAfter(Waiter waiter, Runnable runnable, long timeout, TimeUnit unit)
    {
        AfterTask<?> task = new AfterTask<>(waiter, runnable, timeout, unit);
        log(logLevel, "submit after task %s", task);
        return submit(task);
    }
75992
protected void submitRefreshTask() {
		TokenRefreshTask tokenRefreshTask = new TokenRefreshTask(iamEndpoint, this);
		executor.execute(tokenRefreshTask);
		log.debug("Submitted token refresh task");
	}