mengdiwang / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Omnibus issue for release08 Futures.makeListenable improvements #528

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- makeListenable(someFuture) now catches any RuntimeException thrown by 
someFuture.get() and invokes the user callback at that point.  In short, it 
treats a never-wrapped RuntimeException like an ExecutionException.  This 
prevents an unexpected RuntimeException from breaking callback invocation.

- If the future is already completed, makeListenable now enqueues its
listeners inline instead of in an executor thread.  Note that the actual 
execution of the listeners still occurs in the threads associated with them in 
addListener, so this change is only an optimization except in the case of 
executors like sameThreadExecutor (which, of course, should only be used in 
cases where this distinction is unimportant :)).

- makeListenable now gives its threads meaningful names.  The current form is 
"ListenableFutureAdapter-thread-%d."

Original issue reported on code.google.com by cpov...@google.com on 24 Jan 2011 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 24 Jan 2011 at 10:06

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09