Live data from Hacker News

Project Loom: Fibers and Continuations for the Java Virtual Machine

cr.openjdk.java.net

11–20 of 43 posts

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#11

I skimmed the article but this seems heavily influenced by Quasar http://docs.paralleluniverse.co/quasar/ but doesn't make any mention of it. I have some experience with it and I found it to be a very well designed and documented API. I hope to see it in the JVM someday. The person behind it is pretty active online and does some other interesting things (the TLA+ subreddit), not sure if they are an hn reader but I ho…

If you look at openjdk mailing list Quasar author has joined Oracle and putting this proposal.

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#12
post #11

I skimmed the article but this seems heavily influenced by Quasar http://docs.paralleluniverse.co/quasar/ but doesn't make any mention of it. I have some experience with it and I found it to be a very well designed and documented API. I hope to see it in the JVM someday. The person behind it is pretty active online and does some other interesting things (the TLA+ subreddit), not sure if they are an hn reader but I ho…

If you look at openjdk mailing list Quasar author has joined Oracle and putting this proposal.

Thank you for connecting the dots for me. The creator of Pulsar is Ron Pressler and the author of this proposal.

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#14
Pretty disappointed that continuations won't be able to yield a value(s).

That was one of the most powerful things about Lua's coroutines. Back in games we'd use the yield value as the number of frames to skip before rescheduling giving a really nice coarse grained control over coroutine execution.

It also opens up lazy sequences and all sort of other really useful things.

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#15
post #5

This is an excellent introduction not only to work being done on the JVM, but on some of the implementation challenges of userspace concurrency/greenthreads and M:N scheduling in general. The detail, nuance, and humility present in this article give me some hope that pathological misbehavior of other M:N scheduling models (see Bryan Cantrill's rant/paper about this for more info) may be avoided if something like that…

Executive summary : It will probably all end in tears.

It would be nice just to have TLS that works with NIO[2].

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#16
post #2

Would this mean having something in Java like the M:N thread model we see in Go, Erlang, and such?

Yes, it would.

Again. Since it has this long ago, and long ago removed[1] when folks realized that OS-native threads are the way to go if you have them.

[1] https://en.wikipedia.org/wiki/Green_threads#Green_threads_in...

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#17
post #5

This is an excellent introduction not only to work being done on the JVM, but on some of the implementation challenges of userspace concurrency/greenthreads and M:N scheduling in general. The detail, nuance, and humility present in this article give me some hope that pathological misbehavior of other M:N scheduling models (see Bryan Cantrill's rant/paper about this for more info) may be avoided if something like that…

Executive summary : It will probably all end in tears. It would be nice just to have TLS that works with NIO[2].

[deleted]

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#18
post #5

This is an excellent introduction not only to work being done on the JVM, but on some of the implementation challenges of userspace concurrency/greenthreads and M:N scheduling in general. The detail, nuance, and humility present in this article give me some hope that pathological misbehavior of other M:N scheduling models (see Bryan Cantrill's rant/paper about this for more info) may be avoided if something like that…

Does his rant/paper refer to the 1996 paper, or something else? http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50....

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#19

Pretty disappointed that continuations won't be able to yield a value(s). That was one of the most powerful things about Lua's coroutines. Back in games we'd use the yield value as the number of frames to skip before rescheduling giving a really nice coarse grained control over coroutine execution. It also opens up lazy sequences and all sort of other really useful things.

Are you sure? One of their examples includes code like this:

    produce 1
    fiber sleep 100ms
suggesting that at least they're aware of its usefulness. In any case, it's pretty easy to simulate that with a bit of mutable private state.

Re: Project Loom: Fibers and Continuations for the Java Virtual Machine

#20

Earlier quoted context omitted.

Yes, it would.

Again. Since it has this long ago, and long ago removed[1] when folks realized that OS-native threads are the way to go if you have them. [1] https://en.wikipedia.org/wiki/Green_threads#Green_threads_in...

> when folks realized that OS-native threads are the way to go if you have them.

Well, it depends on what you're trying to do. Having the option of using either is preferable.

Post reply on HN