How many std.concurrency receivers?

Dmitry Olshansky dmitry.olsh at gmail.com
Sun Oct 14 09:59:17 PDT 2012


On 14-Oct-12 20:19, Sean Kelly wrote:
> On Oct 12, 2012, at 2:29 AM, Russel Winder <russel at winder.org.uk> wrote:
>
>> On Thu, 2012-10-11 at 20:30 -0700, Charles Hixson wrote:
>> […]
>>> I'm not clear on what Fibers are.  From Ruby they seem to mean
>>> co-routines, and that doesn't have much advantage.  But it also seems as
>> […]
>>
>> I think the emerging consensus is that threads allow for pre-emptive
>> scheduling whereas fibres do not. So yes as in Ruby, fibres are
>> collaborative co-routines. Stackless Python is similar.
>
> Yep. If fibers were used in std.concurrency there would basically be an implicit yield in send and receive.
>

Makes me wonder how it will work with blocking I/O and the like. If all 
of (few of) threads get blocked this way that going to stall all of 
(thousands of) fibers.

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list