DOCGroup / ACE_TAO

ACE and TAO
https://www.dre.vanderbilt.edu/~schmidt/TAO.html
698 stars 374 forks source link

Fixed a race condition caused by the double checked locking pattern #2179

Closed nfrmtkr closed 8 months ago

nfrmtkr commented 8 months ago

Fixed a race condition caused by the double checked locking pattern by using an std::atomic that ensures correct and deterministic create and assignment logic. Issue #2163

jwillemsen commented 8 months ago

Please also open a PR with the unit test extension as reprocuder

nfrmtkr commented 8 months ago

The test Future_Test.cpp will test this from functional point of view. The issue can't be easily reproduced. It requires fast machines and it depends on the CPU and compiler being used.

nfrmtkr commented 8 months ago

Added new test "Future_Stress_Test"

jwillemsen commented 8 months ago

Thanks!