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.
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.