Package java.util.concurrent

Examples of java.util.concurrent.FutureTask.run()


            }
        }
        if (future != null) {
            try {
                debug(bundle, "Waiting for extension destruction");
                future.run();
                future.get();
            } catch (Throwable t) {
                warn(bundle, "Error while destroying extension", t);
            }
        }
View Full Code Here


            }
        }
        if (future != null) {
            try {
                debug(bundle, "Waiting for extension destruction");
                future.run();
                future.get();
            } catch (Throwable t) {
                warn(bundle, "Error while destroying extension", t);
            }
        }
View Full Code Here

            getExecutorService(exchange.getContext()).submit(task);
            return task;
        } else {
            // execute task now
            try {
                task.run();
                return task.get();
            } catch (ExecutionException e) {
                // we don't want the wrapped exception from JDK
                throw e.getCause();
            }
View Full Code Here

    myIdeMock.expects(once()).method("runOnPooledThread").will(new CustomStub("foo"){
      @Override
      public Object invoke(Invocation invocation) throws Throwable {
        final FutureTask task = new FutureTask((Runnable) invocation.parameterValues.get(0), null);
        task.run();
        return task;  //To change body of implemented methods use File | Settings | File Templates.
      }
    });
    myDispatcherMock.expects(once()).method("clearHistory");
View Full Code Here


    private Future getReduceTestEntry( Object value ) {
        // Create a task and run it, assuring that the tests won't block on a get.
        FutureTask task = new FutureTask( new ReduceTestEntry( value ) );
        task.run();
        return task;
    }

    public Future notifyReduce( Future lhs, Future rhs )  {
        List<Integer> reduce = new ArrayList<Integer>();
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.