Re: Fiber implementation questions

2016-06-21 Thread Steven Schveighoffer via Digitalmars-d
On 6/21/16 3:03 PM, David Nadlinger wrote: On Tuesday, 21 June 2016 at 16:12:13 UTC, Steven Schveighoffer wrote: On 6/21/16 11:43 AM, Dicebot wrote: On Tuesday, 21 June 2016 at 12:18:37 UTC, Steven Schveighoffer wrote: On 6/21/16 6:14 AM, Dicebot wrote:

Re: Fiber implementation questions

2016-06-21 Thread David Nadlinger via Digitalmars-d
On Tuesday, 21 June 2016 at 16:12:13 UTC, Steven Schveighoffer wrote: On 6/21/16 11:43 AM, Dicebot wrote: On Tuesday, 21 June 2016 at 12:18:37 UTC, Steven Schveighoffer wrote: On 6/21/16 6:14 AM, Dicebot wrote: httpthub.com/dlang/druntime/blob/master/src/core/thread.d#L1611 I suspected

Re: Fiber implementation questions

2016-06-21 Thread Steven Schveighoffer via Digitalmars-d
On 6/21/16 11:43 AM, Dicebot wrote: On Tuesday, 21 June 2016 at 12:18:37 UTC, Steven Schveighoffer wrote: On 6/21/16 6:14 AM, Dicebot wrote: On 06/20/2016 11:17 PM, deadalnix wrote: Q2: core.thread.Fiber implementation looks like GC does not scan function stacks for yielded contexts. Why?

Re: Fiber implementation questions

2016-06-21 Thread Dicebot via Digitalmars-d
On Tuesday, 21 June 2016 at 12:18:37 UTC, Steven Schveighoffer wrote: On 6/21/16 6:14 AM, Dicebot wrote: On 06/20/2016 11:17 PM, deadalnix wrote: Q2: core.thread.Fiber implementation looks like GC does not scan function stacks for yielded contexts. Why? Doesn't it ?

Re: Fiber implementation questions

2016-06-21 Thread Steven Schveighoffer via Digitalmars-d
On 6/21/16 6:14 AM, Dicebot wrote: On 06/20/2016 11:17 PM, deadalnix wrote: Q2: core.thread.Fiber implementation looks like GC does not scan function stacks for yielded contexts. Why? Doesn't it ? https://github.com/dlang/druntime/blob/master/src/core/thread.d#L4328 allocates fiber stack

Re: Fiber implementation questions

2016-06-21 Thread Dicebot via Digitalmars-d
On 06/20/2016 11:17 PM, deadalnix wrote: >> Q2: core.thread.Fiber implementation looks like GC does not scan >> function stacks for yielded contexts. Why? >> > > Doesn't it ? https://github.com/dlang/druntime/blob/master/src/core/thread.d#L4328 allocates fiber stack using mmap / malloc /

Re: Fiber implementation questions

2016-06-21 Thread Ilya Yaroshenko via Digitalmars-d
On Monday, 20 June 2016 at 20:17:04 UTC, deadalnix wrote: On Monday, 20 June 2016 at 15:43:27 UTC, Ilya Yaroshenko wrote: Q2: core.thread.Fiber implementation looks like GC does not scan function stacks for yielded contexts. Why? Doesn't it ? I thought the code should be added to the GC

Re: Fiber implementation questions

2016-06-20 Thread deadalnix via Digitalmars-d
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

Re: Fiber implementation questions

2016-06-20 Thread Dicebot via Digitalmars-d
On 06/20/2016 06:43 PM, 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

Re: Fiber implementation questions

2016-06-20 Thread Sönke Ludwig via Digitalmars-d
Am 20.06.2016 um 17:43 schrieb Ilya Yaroshenko: 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. I'm

Fiber implementation questions

2016-06-20 Thread Ilya Yaroshenko via Digitalmars-d
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