Wait-free thread communication

Jin via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 13 05:59:35 PST 2016


On Sunday, 10 January 2016 at 21:25:34 UTC, Martin Nowak wrote:
>> For blocking thread i use loop with Thread.sleep - this is bad 
>> decision IMHO.
> Have a look at this exponential backoff implementation for my GC
> spinlock PR.
> https://github.com/D-Programming-Language/druntime/pull/1447/files#diff-fb5cbe06e1aaf83814ccf5ff08f05519R34
> In general you need some sort of configurable or adaptive 
> backoff or you'll waste too much time context switching.

I am using Waiter for this 
https://github.com/nin-jin/go.d/blob/master/source/jin/go.d#L171



More information about the Digitalmars-d mailing list