You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version
nl.komponents.kovenant:kovenant:3.3.0
nl.komponents.kovenant:kovenant-android:3.3.0
Kotlin: 1.2.10
Android Studio 3.0.1
Build #AI-171.4443003, built on November 10, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
Test Code:
val test = mutableListOf<Promise<Int, Exception>>()
test.add(task { task { 1 }.get() })
all(test) success {
// Never called
}
Note that Promise.of(1).get() works fine but not task { 1 }.get().
I can confirm that the inner task has been executed but somehow success is never called. I was trying to use this as fallback task, for example:
Do you happen to have Kovenant configured with just one worker thread? Because in that case this indeed will block. It's not a good idea to use blocking methods like get in a mix with async methods. Like @friendoye suggested, you are probably want to use unwrap. Or just try to avoid nested Promises al together.
Version
nl.komponents.kovenant:kovenant:3.3.0
nl.komponents.kovenant:kovenant-android:3.3.0
Kotlin: 1.2.10
Android Studio 3.0.1
Build #AI-171.4443003, built on November 10, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1
Test Code:
Note that
Promise.of(1).get()
works fine but nottask { 1 }.get()
.I can confirm that the inner task has been executed but somehow success is never called. I was trying to use this as fallback task, for example:
The text was updated successfully, but these errors were encountered: