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

Yield and initial state for MapAsync and MapThreaded #22

Open
semiversus opened this issue Oct 2, 2018 · 1 comment
Open

Yield and initial state for MapAsync and MapThreaded #22

semiversus opened this issue Oct 2, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@semiversus
Copy link
Owner

MapAsync and MapThread are stateless and the first value emitted is after running the first coroutine/function. By adding an init argument the operator get's stateful with init as initial state.

Additionally explore the use of yield in the coroutine to emit values during the coroutine/function is running.

@semiversus semiversus added the enhancement New feature or request label Oct 2, 2018
@semiversus
Copy link
Owner Author

semiversus commented Oct 7, 2018

Instead of yield it's easier to use self.notify(). For MapThreaded a threadsafe variant with loop.call_soon should be implemented.

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

No branches or pull requests

1 participant