|
|
|
|
|
by ibraheemdev
295 days ago
|
|
> And futexes aren’t the only way to get there. Alternatives: > - thin locks (what JVMs use) > - ParkingLot (a futex-like primitive that works entirely in userland and doesn’t require that the OS have futexes) Worth nothing that somewhere under the hood, any modern lock is going to be using a futex (if supported). futex is the most efficient way to park on Linux, so you even want to be using it on the slow path. Your language's thread.park() primitive is almost certainly using a futex. |
|
Sure that uses futex under the hood, but the point is, you use futexes on Linux because that’s just what Linux gives you