|
|
Log in / Subscribe / Register

The problem with nested sleeping primitives

The problem with nested sleeping primitives

Posted Jan 9, 2015 17:29 UTC (Fri) by iabervon (subscriber, #722)
In reply to: The problem with nested sleeping primitives by reubenhwk
Parent article: The problem with nested sleeping primitives

Probably because it was a smaller change from the previous version with prepare_to_wait(), and therefore easier to review. Also, when the condition is a function with (temporary) side effects, it can be easier to discuss the former than the latter, just in terms of having separate lines for the "while" keyword and the condition text when proposing potential races.

If you were writing new code with a simple condition, the latter would be better, except that you'd use prepare_to_wait() in that case anyway.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds