Examples of MeanwhileRunner


Examples of com.level3.meanwhile.concurrent.MeanwhileRunner

         * @see ClaimCheck
         * @see Future
         */
  public <T extends Task> ClaimCheck execute(final T task) {
    startUp();
                MeanwhileFuture<T> future = new MeanwhileFuture<T>(new MeanwhileRunner(task,this));
                if(task instanceof Stage) {
                    stagePool.execute(future);
                } else {
                    pool.execute(future);
                }
View Full Code Here

Examples of com.level3.meanwhile.concurrent.MeanwhileRunner

         * @see Task
         * @see Future
         */
  public <T extends Task> MeanwhileFuture<T> submit(final T task) {
    startUp();
                MeanwhileFuture<T> future = new MeanwhileFuture<T>(new MeanwhileRunner(task,this));
                if(task instanceof Stage) {
                    stagePool.execute(future);
                } else {
                    pool.execute(future);
                }
View Full Code Here

Examples of com.level3.meanwhile.concurrent.MeanwhileRunner

        assertFalse(check2.equals(check1));
    }
   
    @Test
    public void coverageHacks() throws Exception {
        MeanwhileRunner runner = new MeanwhileRunner(new BaseTask() {

            @Override
            public boolean execute() {
                throw new UnsupportedOperationException("Not supported yet.");
            }
        }, manager);
        MeanwhileFuture future = new MeanwhileFuture(runner);
        assertTrue(future.equals(future));
        assertTrue(future.hashCode()==future.hashCode());
        assertTrue(runner.equals(runner));
        assertTrue(runner.hashCode()==runner.hashCode());
    }
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.