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

It buys you plenty if you prevent other threads from entering until you all meet in a rendezvous lock.


The worker thread that was kicked off by some random library dependency (acquiring a lock you didn't know about) isn't going to care about your rendezvous lock. Even if you do control all the threads getting them to do what you're suggesting may be nontrivial and costly.

Edit: IMO it's better to just admit the programming model is thorny and move on. I feel similarly about signals. Restrict what you do after fork() and generally be cautious, the same way you'd be cautious reacting to a signal.


Wrap the thread create calls and make them care. :)




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

Search: