Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement features required for structured concurrency #245

Open
graingert opened this issue Oct 11, 2024 · 0 comments
Open

implement features required for structured concurrency #245

graingert opened this issue Oct 11, 2024 · 0 comments

Comments

@graingert
Copy link

graingert commented Oct 11, 2024

I'd like to be able to implement a timeout or TaskGroup context manager like in Trio/asyncio:

import sleep from 'effection';

function* example () {
    using* tg = new TaskGroup();
    tg.startSoon(sleep, 10);
    yield* sleep(1);
}

This requires access to the error:
#49

and support for generator functions in disposing, specifically a Symbol.generatorDispose that supports a generator function that gets called when using using*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant