Package org.apache.sling.commons.threads

Examples of org.apache.sling.commons.threads.ThreadPool.execute()


        };
        // check if the thread pool is available
        final ThreadPool pool = Environment.THREAD_POOL;
        if ( pool != null ) {
            pool.execute(task);
        } else {
            // if we don't have a thread pool, we create the thread directly
            // (this should never happen for jobs, but is a safe fallback and
            // allows to call this method for other background processing.
            new Thread(task).start();
View Full Code Here


                    };
                    // check if the thread pool is available
                    final ThreadPool pool = this.threadPool;
                    if ( pool != null ) {
                        pool.execute(task);
                    } else {
                        // if we don't have a thread pool, we create the thread directly
                        // (this should never happen for jobs, but is a safe fall back)
                        new Thread(task).start();
                    }
View Full Code Here

    final ThreadPool exec = threadPool;

    if (exec == null) {
      log.debug("executor is unbound");
    } else {
      exec.execute(task);
    }

  }

  @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.