Skip to content

Nested promise never complete with all #10

@joshuaavalon

Description

@joshuaavalon

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:

task {
    cache.get(key) ?: loadFromWebTask(key).get()
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions