Re:Without the Futex, It's Futile
by tialaramex on Wednesday August 20, 2025 @05:53AM
(#44960390)
While I'm sure it sounds great to Apple fans, this ends up just being a circle in practice. We need a way to fall asleep when contended. Apple calls this a "Parking Lot" Linux calls it a "Futex" and as we've seen Microsoft have a different name.
Like Microsoft's Apple's approach is slightly smaller (one byte not four) and over a decade later.
Well, but with a parking_lot abstraction, you only need a wait primitive per thread (as a thread_local for example), so it doesn't need to be a futex. It could be a eventfd which is interesting for integrating with other event loops.
Re:Without the Futex, It's Futile
by senderista on Wednesday August 20, 2025 @11:28AM
(#44962828)
By putting the wait queues in userspace you can customize behavior with callbacks, as the article shows.
https://webkit.org/blog/6161/locking-in-webkit/