This is in preparation to make the code here more target agnostic for porting to the Windows threading primitives. This is used pretty extensively in the tests, so disabling tests would lose a chunk of coverage.