Remove timeout from MessageQueueThreadImpl creation

Reviewed By: oli

Differential Revision: D2880630

fb-gh-sync-id: bd31395abc69750f16a6ab32d11c55af3ec985a4
This commit is contained in:
Andrei Coman authored and facebook-github-bot-5 committed 2016-01-29 14:12:33 -08:00
1 parent 041fb59146
commit 8a10fc629a
2 files changed
+15 -4

No files matched your search

@@ -91,6 +91,18 @@ public class SimpleSettableFuture<T> implements Future<T> {
return mResult;
}
/**
* Convenience wrapper for {@link #get()} that re-throws get()'s Exceptions as
* RuntimeExceptions.
*/
public @Nullable T getOrThrow() {
try {
return get();
} catch (InterruptedException | ExecutionException e) {
throw new RuntimeException(e);
}
}
/**
* Convenience wrapper for {@link #get(long, TimeUnit)} that re-throws get()'s Exceptions as
* RuntimeExceptions.