We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b617064 commit ed1c1a5Copy full SHA for ed1c1a5
src/main/java/cn/hackingwu/promise/Promises.java
@@ -15,9 +15,11 @@ class Promises {
15
private static ExecutorService executorService = Executors.newCachedThreadPool();
16
17
public static void subscribe(final Promise promise) {
18
- if (!promise.getPromiseList().isPending()) {
+ PromiseList promiseList = promise.getPromiseList();
19
+ if (!promiseList.isPending()) {
20
Future future = publish(promise);
- promise.getPromiseList().setFuture(future);
21
+ promiseList.setFuture(future);
22
+ promiseList.setPending(true);
23
}
24
25
0 commit comments