-
Notifications
You must be signed in to change notification settings - Fork 90
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
Task-pooling based parallelization & incremental output #252
Comments
To be precise, The reason I'm explaining that is to point out that if you want something that produces results earlier than that then you need to drop the requirement to preserve the original order. Usually the way you do this is to have each action store the result in a buffer and then you stream the results from the buffer. Going back to your original question: you can get the task-based approach to stream incrementally using the same trick. Have each task store its result in a buffer and then stream the results from the buffer. |
Ah, I understand how What would you use for the buffer? A |
Yeah, it could be any buffer |
When scheduling longer tasks (like audio file conversion), all cores should be used by the script.
Right now Turtle only contains
parallel
, which will schedule as many parallel processes asfork
allows and only return the results after every element has been processed.I’d like to use something like
async-pool
, here’s a first try:It uses exactly four cores now, but the output is still deferred until the very end; I’m not sure if it’s possible to integrate that into the streaming abstraction?
The text was updated successfully, but these errors were encountered: