Skip to content

Introduce a "sending side" (settable) for Deferred #70

Closed
@elizarov

Description

@elizarov

As reported by @vaskir at public Slack:

What if I want to pass it as a channel somewhere, then wait until it's ready? I do it with a channel like this:

    val reply = Channel<Long>()
    getAndResetCh.send(reply)
    return reply.receive()
}

so I send a message to an actor "do the job, then send the result to this channel when ready", then I wait on receive asynchronously.

So, the use-case is basically to send some object to remote actor to receive a single answer from it. How to we name such and object and what would its "sending" (setting) function be named?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions