Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tristan-lanfrey opened this issue Aug 14, 2024 · 0 comments · Fixed by #3030
Closed
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@tristan-lanfrey
Copy link

tristan-lanfrey commented Aug 14, 2024

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.

@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 14, 2024
@marcalff marcalff changed the title PeriodicExportingMetricReader::CollectAndExportOnce() future is never set and CollectAndExportOnce() probably blocks until timeout [SDK] PeriodicExportingMetricReader: future is never set, blocks until timeout Aug 16, 2024
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
2 participants