ChimeraTK / cppext

A collection of C++ classes which are quite fundamental and thus considered inside ChimeraTK as an extension of C++.
GNU Lesser General Public License v3.0
2 stars 1 forks source link

fix: race condition #32

Closed killenb closed 1 year ago

killenb commented 1 year ago

When creating the notification queue in when_any() while the sending thread is already active, the when_any_index was written and read concurrently, but neither atomic nor protected by a mutex or memory barrier.

killenb commented 1 year ago

I could not see any differences in the performance test. I extended to 1e7 transfers, but still the statistical fluctuations were large (much larger than the effect of the atomic)

mhier commented 1 year ago

The issue with the hanging test was unrelated?