mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove timeout from MessageQueueThreadImpl creation
Reviewed By: oli Differential Revision: D2880630 fb-gh-sync-id: bd31395abc69750f16a6ab32d11c55af3ec985a4
This commit is contained in:
1 parent
041fb59146
commit
8a10fc629a
2 files changed
+15
-4
No files matched your search
+12
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user