I really appreciate this Project Loom piece, both for the good things it suggests about where the JVM is going, and for making a clear case that M:N threading is the right thing for most platforms. http://cr.openjdk.java.net/~rpressler/loom/loom/sol1_part1.html …
-
-
Replying to @samth
Ooh! One thing that's interesting about this design is that it pins a virtual thread to an OS thread whenever there's a mixed stack (JVM / JNI / JVM). Part of the design is that mixed stack are rare, so it's okay to pin threads.
1 reply 0 retweets 1 like -
Replying to @asajeffrey @samth
This is quite different from my experience with Rust, where (at least in Servo) pretty much all stacks are mixed Rust/C/C++, and quite a lot are mixed Rust/C/C++/JS.
1 reply 0 retweets 0 likes -
Replying to @asajeffrey
Is that because Servo is a mix of existing components and new ones?
3 replies 0 retweets 0 likes -
Replying to @samth @asajeffrey
A lot of Rust apps look like this; e.g. here’s a Pathfinder profile I had open. In the case of Pathfinder it’s because there’s no way to access the GPU without going through the Objective-C Metal library which assumes big stacks.pic.twitter.com/3sEgr6f8tK
3 replies 1 retweet 5 likes -
I wonder how Java avoids this for client apps? I'd expect native UI libraries to be a source of mixed stacks. Perhaps the common case is one UI thread that ends up pinned, but the other threads are unpinned?
1 reply 0 retweets 0 likes -
Replying to @asajeffrey @samth
I think people just don’t write M:N UI apps in Java
1 reply 0 retweets 1 like -
Thinks... Er, Eclipse maybe?
1 reply 0 retweets 0 likes -
-
M:N is usually for servers. There isn’t much benefit for desktop/mobile apps where the number of threads is small.
1 reply 0 retweets 0 likes
(By “small” I mean fewer than 10,000)
-
-
Replying to @pcwalton @asajeffrey
Isn't 10k already expensive on Windows?
2 replies 0 retweets 0 likes -
doesn't Windows now have UMS, which mitigates a lot of the historical problems with C10K?
1 reply 0 retweets 0 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.