3 ms·
In src/common/cancellable_queue.h std::size_t calculateBackpressure() { return currentReadQueue->size() + currentWriteQueue->size(); } No
by m0zg 6y ago
In src/common/cancellable_queue.h
std::size_t calculateBackpressure()
{
return currentReadQueue->size() + currentWriteQueue->size();
}
Not thread-safe. Shared queues are accessed without a lock. So this will eventually blow up as the queues are swapped in a different thread, or due to inconsistent reads on un-synchronized variables.
Recommendation to MS folks: find someone at MS who knows C++. Barring that, at least run ASAN and TSAN on your stuff before you release it.
- otterley 6y agoHave you considered posting an issue on GH? Bug reports like these are unlikely to be seen here by the authors.