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

Concurrency question #38

Open
goto40 opened this issue Nov 5, 2019 · 3 comments
Open

Concurrency question #38

goto40 opened this issue Nov 5, 2019 · 3 comments

Comments

@goto40
Copy link

goto40 commented Nov 5, 2019

Are there any plans to include concurrency? E.g. after a fork...?

@joboccara
Copy link
Owner

This is a very interesting question. I'd imagine fork could send data to each of its following pipes in as many threads? And then the main thread would wait for all to finish?
Tbh I'm not experienced enough with multi-threading to implement this in an optimal manner. I would welcome any suggestion.

@DBJDBJ
Copy link

DBJDBJ commented Aug 27, 2020

perhaps introducing the "map/reduce" paradigm will bear some fruit.

other than that one might be lead to believe in the C++20 co_await world one could have some immediate results.

@godefv
Copy link

godefv commented Oct 16, 2020

Using std::async, the implementation would be really easy.
pipes::fork could take an optional policy argument from std::launch and forward it to std::async, or just use std::launch::async.
pipes::fork would then either need to return the std::future objects, or wait for them by itself.

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

4 participants