On Monday, 20 June 2016 at 15:43:27 UTC, Ilya Yaroshenko wrote:
Hello,
I am thinking about faster event loop that vibe.d has (does not
matter what driver are used). I want to implement (at least
DIP) advanced Fiber yielding loop that can allow to eliminate
context switching for all kind of event waiters.
Q1: Is it save to detach Fiber context from one thread and
attach it to another thread?
No, and there are no way to make it safe without significant
penalty for ALL code (not just code using fibers) and breaking
the type system.
Q2: core.thread.Fiber implementation looks like GC does not
scan function stacks for yielded contexts. Why?
Doesn't it ?