Skip to content

[SDK] PeriodicExportingMetricReader: future is never set, blocks until timeout #3026

@tristan-lanfrey

Description

@tristan-lanfrey

PeriodicExportingMetricReader::CollectAndExportOnce() future is never set and CollectAndExportOnce() probably blocks until timeout.

    std::promise<void> sender;
    auto receiver = sender.get_future();

nothing ever sets receiver's value. suggestion is to pass sender into the thread and have the thread call sender.set_value() when finished, in order to unblock the below receiver.wait_for() as soon as possible.

I think the saving grace here is the break when the future eventually times out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions