Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do it in C++, actually, using Clang’s thread safety attributes:

https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

You can create a dummy ‘lock’ type that just represents being on a certain thread, with corresponding global variables for different named threads.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: