News for hackers. Stuff that matters.
Re:State of Loom by lmm on Tuesday May 19, 2020 @07:51AM (#23233806)
> Same goes for async/await. The decision to keep you running on the same native thread is up to the scheduler.

The scheduler decides what happens at each yield point, but code that doesn't yield is guaranteed to stay pinned to a single native thread. A non-async function is somewhat analogous to a critical section; the difference between async and not is a visible distinction between must-run-on-a-pinned-native-thread functions and may-be-shuffled-between-native-threads functions.

Re:State of Loom by pron on Tuesday May 19, 2020 @12:05PM (#23236398)
Can you give an example where this matters -- i.e. it's useful and allowed to move between native threads but not between well-known points -- given that the identity of the carrier thread cannot leak to the virtual thread?