Disallow thread local concepts to allow fibers move between threads @notl
Sebastiaan Koppe
mail at skoppe.eu
Mon Jun 17 16:19:51 UTC 2024
On Saturday, 15 June 2024 at 13:12:12 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> On 16/06/2024 1:07 AM, Sebastiaan Koppe wrote:
>> In your opening post you say fibers lost, which I agree with,
>> but then proceed to propose 3 new attributes for a fiber
>> library feature which is essentially mimicking globals. Why
>> would we want to make it easier to do the wrong thing?
>
> 1. Migration to better event loops without forcing everyone to
> rewrite the world and in turn lowering the cost of adoption.
I'll like to see those event loops before proposing to change the
language.
Also, I am skeptical of not having to rewrite things. As much as
I want to avoid it, I just don't see it happening.
> 2. It'll map into stackless, we'll need a solution there to
> prevent escaping for things like locks between states. So it
> isn't a waste of effort.
Holding synchronous locks across suspension points isn't
recommended. You'll want to avoid it by switching to async locks
or use lock-free algorithms.
More information about the dip.ideas
mailing list