Skip to content

init after completed #9

Description

@JanKoelzer

cell1 = pool.createCell(new DefaultKey[Int], () => {
// depend on a already completed cell, callback is triggered immediately
cell1.whenComplete(completed, _ => FinalOutcome(10))

cell1.onComplete(_ => latch.countDown())
latch.await() // meanwhile, cell1 gets final value 10 via whenComplete

NextOutcome(-1) // the intended initial value of cell1.
})

If the PR on lazy evaluation gets accepted, simply catch the exception that is thrown when init() is called and the returned value is put.

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