4 ms·
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 expl
by steveklabnik 12y ago
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.
- Blackthorn 12y agoHow 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.
- steveklabnik 12y agoYou'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.
- kibwen 12y agoThe 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.