On 11-05-25 09:19 PM, Rafael Ávila de Espíndola wrote:
Maybe I don't understand the subject very well, but shouldn't
backtracking from the choice of implementing M:N simply involve limiting
it to 1:1, and turning off the code that emits yield statements? Thus
making actual benchmarking possible. While that will cost the work to
implement it still; Clearly that should be worth getting the actual
performance data, right?
You should include the cost of getting there in the first place. A lot
more has to be implemented to get M:N working.
Sure. We have to implement ... ucontext.h. Which is already present on 2
of our main platforms and there are several free copies floating around
the net if we're having trouble implementing it on the 3rd.
Then we also have to implement a few run queues and a simple scheduler,
but we already have those in the runtime to crib from. And we need
shutdown semantics, which we'd need anyways. Anything else?
It'll take some doing, but not an infinite amount. This is not a full
threading library for C threads. Just the lifecycle points of semantics
we control. The IO layer -- where much of the cost in most threading
libraries is -- is completely disjoint from this issue.
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev