News for hackers. Stuff that matters.
Re:Why Continuations Are Coming to Java by TickleSteve on Tuesday July 02, 2019 @07:24AM (#20333980)
Regarding point 2)

That is not how OS level threads would work. When a lock is released, the next ready-to-run task (blocked on that lock) will be made runnable. They wont all be released then 'race' to acquire the lock. The behaviour is identical in user-space or kernel-space.

Re:Why Continuations Are Coming to Java by scott_s on Tuesday July 02, 2019 @12:57PM (#20337009)
That depends on the synchronization mechanism used, and whether or not that mechanism is hooked into the kernel scheduler. Sometimes it is (such as pthread_mutex) and sometimes it is not (such as rolling your own spin locks).
Re:Why Continuations Are Coming to Java by TickleSteve on Tuesday July 02, 2019 @02:01PM (#20337681)
ok, any "sane" implementation would not use spin-locks for this purpose, but yes it is technically possible to do so.

Spin-locks are not really the mechanism of choice for this level of abstraction.