PeriodicExportingMetricReader::CollectAndExportOnce() future is never set and CollectAndExportOnce() probably blocks until timeout.
|
std::promise<void> sender; |
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.