47 |
|
* implements <tt>Runnable</tt>, and so may be executed by an <tt>Executor</tt>. |
48 |
|
* For example, the above construction with <tt>submit</tt> could be replaced by: |
49 |
|
* <pre> {@code |
50 |
< |
* FutureTask<String> future = |
51 |
< |
* new FutureTask<String>(new Callable<String>() { |
52 |
< |
* public String call() { |
53 |
< |
* return searcher.search(target); |
54 |
< |
* }}); |
55 |
< |
* executor.execute(future);}</pre> |
50 |
> |
* FutureTask<String> future = |
51 |
> |
* new FutureTask<String>(new Callable<String>() { |
52 |
> |
* public String call() { |
53 |
> |
* return searcher.search(target); |
54 |
> |
* }}); |
55 |
> |
* executor.execute(future);}</pre> |
56 |
|
* |
57 |
|
* <p>Memory consistency effects: Actions taken by the asynchronous computation |
58 |
|
* <a href="package-summary.html#MemoryVisibility"> <i>happen-before</i></a> |