Re:Rust 0.12.0 released
by steveklabnik on Thursday October 09, 2014 @03:24PM
(#8434523)
The existing libgreen will be moved out to a Cargo library. You just won't be able to seamlessly switch between the two like you did before, you'll have to explicitly use the green threading API instead.
[ Parent
| on HN ]
Re:Rust 0.12.0 released
by Blackthorn on Thursday October 09, 2014 @06:27PM
(#8435337)
How will this work if you depend on a lib that uses traditional threading but want to use green threads yourself? That actually comes up a lot at my work.
Re:Rust 0.12.0 released
by steveklabnik on Thursday October 09, 2014 @06:43PM
(#8435399)
You'd have to use one that uses green threads internally.
Basically, in the effort to make the abstraction Just Work between 1:1 and N:M threading, we made green threads so heavyweight that they barely even qualified as green anymore. It's only by removing that abstraction that we could feasibly make them lightweight again.
The current implementation that's being phased out was designed to abstract away the threading model such that libraries could make use of concurrency while the programs that use those libraries could use any threading model they choose, and it would all Just Work. However, in practice this caused too many compromises in the implementation of both the native thread runtime and the green thread runtime, erasing the benefits of both.
Sorry! We're sensitive to your use case, but we just couldn't make it work.