C++ race condition helper

 

 

Usage: