Skip to content

Commit

Permalink
properties re-added
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos Dogaru committed Oct 30, 2011
1 parent 1ea49bd commit efa0355
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions src/main/resources/FutureCodeProperties
@@ -0,0 +1,68 @@
initialCode=<br>// Future objects are returned on submit to ExecutorService<br> \
// or can be created by constructing a FutureTask.<br> \
<br> \
// The Future.get() method blocks<br> \
// until some result is available.<br> \
<br> \
final Future future =<br> \
Executors.newCachedThreadPool().submit(someCallable); <br><br> \
// OR<br> \
<br> \
FutureTask&lt;Callable&gt; future = new FutureTask&lt;Callable&gt;(someCallable);<br> \
Thread thread = new Thread(futureTask);<br> \
thread.start();<br> \
<br><br><br> \
// Finally, the Future task completes<br> \
// and the block passes through.<br> \
Object result = future.get();
startExecutionBoldCode=<br>// Future objects are returned on submit to ExecutorService<br> \
// or can be created by constructing a FutureTask.<br> \
<br> \
// The Future.get() method blocks<br> \
// until some result is available.<br> \
<br> \
<b> final Future future =<br> \
Executors.newCachedThreadPool().submit(someCallable);</b> <br><br> \
// OR<br> \
<br> \
<b>FutureTask&lt;Callable&gt; future = new FutureTask&lt;Callable&gt;(someCallable);<br> \
Thread thread = new Thread(futureTask);<br> \
thread.start();</b><br> \
<br><br><br> \
// Finally, the Future task completes<br> \
// and the block passes through.<br> \
Object result = future.get();
waitForResultCode=<br>// Future objects are returned on submit to ExecutorService<br> \
// or can be created by constructing a FutureTask.<br> \
<br> \
// The Future.get() method blocks<br> \
// until some result is available.<br> \
<br> \
<b> final Future future =<br> \
Executors.newCachedThreadPool().submit(someCallable);</b> <br><br> \
// OR<br> \
<br> \
<b>FutureTask&lt;Callable&gt; future = new FutureTask&lt;Callable&gt;(someCallable);<br> \
Thread thread = new Thread(futureTask);<br> \
thread.start();</b><br> \
<br><br><br> \
// Finally, the Future task completes<br> \
// and the block passes through.<br> \
<blink><font color="red"> Object result = future.get();</font></blink>
getFutureCode=<br>// Future objects are returned on submit to ExecutorService<br> \
// or can be created by constructing a FutureTask.<br> \
<br> \
// The Future.get() method blocks<br> \
// until some result is available.<br> \
<br> \
final Future future =<br> \
Executors.newCachedThreadPool().submit(someCallable); <br><br> \
// OR<br> \
<br> \
FutureTask&lt;Callable&gt; future = new FutureTask&lt;Callable&gt;(someCallable);<br> \
Thread thread = new Thread(futureTask);<br> \
thread.start();<br> \
<br><br><br> \
// Finally, the Future task completes<br> \
// and the block passes through.<br> \
<b> Object result = future.get();</b>

0 comments on commit efa0355

Please sign in to comment.