Lets talk about fibers

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 4 06:16:47 PDT 2015


On 6/3/15 9:51 PM, Joakim wrote:

>
> Your entire argument seems based on fibers moving between threads
> breaking your reactor IO model.  If there was an option to
> disable fibers moving or if you had to explicitly ask for a fiber
> to move, your argument is moot.
>
> I have no dog in this fight, just pointing out that your argument
> is very specific to your use.

I plead complete ignorance and inexperience with fibers and thread 
scheduling.

But I think the sanest approach here is to NOT support moving fibers, 
and then add support if it becomes necessary. We can make the scheduler 
something that's parameterized, or hell, just edit your own runtime if 
you need it!

It may also be that fibers that move can't be statically checked to see 
if they will break on moving. That may simply just be on you, like casting.

I think for the most part, the safest default is to have a fiber 
scheduler that cannot possibly create races. Let's build from there.

-Steve


More information about the Digitalmars-d mailing list