kphp
kphp copied to clipboard
New locker mechanism and small data race fixes
I have tried to run transpiler with TSAN on simple program and found lots of data races. This PR fixes some of them, but not all.
- Introduce new locker that is implemented as 3-state futex-based mutex
- Add some atomic variables instead of non-atomic
- Clone some nodes instead of copying references