[rust-dev] Idea: Memcpyed stacks for green tasks

Bill Myers bill_myers at outlook.com
Sat Jan 25 14:29:19 PST 2014

Interesting: my proposal appears to be indeed a generalization of the greenlet approach.

Specifically, while the greenlet proposal seems to only use one large stack per native thread, I'm suggesting to use multiple large stacks that can be stolen by other threads, which does mitigate the issues stemming from non-position dependent stacks (they are not eliminated, but they have low probability of happening).

It's also indeed possible to fully eliminate those issues by autoboxing everything whose address is taken, but that would have a potentially large performance impact on non-blocking code, while merely copying the stack only imposes a performance penalty to code that blocks. 		 	   		  

More information about the Rust-dev mailing list