public static < V > Future < V > execute ( Callable < V > callable ) { FutureTask < V > futureTask = new FutureTask < V > ( callable ) ; new Thread ( futureTask ) . start ( ) ; return futureTask ; }
Executes the callable in a separate thread and return the future to get the result . Note that this implementation is not efficient and should be used very carefully .