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

I disagree. You don't know where in your code the scheduler will interrupt you, it could be any time, so if you do unsafe things to shared structures you still need the mutex, it's just less likely that you will get rescheduled at precisely the right moment to hit it.

In other words data races will still potentially cause another thread to see a data structure in an intermediate state. It will just be a rare bug instead of a potentially more common one.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: