Skip to content

Futures returned in library are not send #165

@LLFourn

Description

@LLFourn

Send is explicitly opted out of here:

#[async_trait(?Send)]
.

This is a bit of a problem. For example, after potentially receiving some funds you might like to do:

tokio::spawn(wallet.sync(...).then(|res| info!(the result of the sync was "{:?}", res))

To sync the wallet in the background. This is not possible since the future must be Send to send to tokio::spawn.
It will take some re-engineering of the internals to make this work.

@afilini do you have opinions on how to address this?

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