Hacker News new | past | comments | ask | show | jobs | submit login

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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: