mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 14:25:08 +08:00
Remove timeout from MessageQueueThreadImpl creation
Reviewed By: oli Differential Revision: D2880630 fb-gh-sync-id: bd31395abc69750f16a6ab32d11c55af3ec985a4
This commit is contained in:
committed by
facebook-github-bot-5
parent
041fb59146
commit
8a10fc629a
@@ -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