Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But now we’re moving back to green threads

We aren’t moving back! Back then it was M:1. We're now moving to M:N/M:M.

You’re making it sound like we’re reverting to the previous design or implementation. Neither is true.



Green threads are threads which are scheduled in userspace; Java 1 threads were scheduled in userspace, and Loom threads are scheduled in userspace. Loom is absolutely a reversion to userspace scheduling, and I think the intervening decision to delegate scheduling to the OS is something that's interesting to think about, because in hindsight it seems to have been the wrong decision.

(Also, IIRC Linux didn't even have native OS threads when Java 1.0 came out, so M:1 was literally and the only option available in Linux at the time. My memory is that we had to wait for pthreads before we could have hotspot on Linux, but it's a long time ago and quite tangental to my point).


> and I think the intervening decision to delegate scheduling to the OS

This is where you're getting confused.

This wasn't an 'intervening decision' because we haven't removed it and with Loom the OS is still able to schedule your threads. The user-space threads are opt-in. That's why it's not a reversion. Because Java was never like this before.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: