-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add of_lwt and of_list_lwt to stream #864
Conversation
Hi, |
I understand the purpose of I'm tempting to a. Leave b. Add an |
I think my use case is that I have stream in and stream out, but some calculations in the middle require the data to be aggregated and processed in
|
I see, so you have some steps that can be processed item-by-item using map or something like that, and then occasionally you have steps that need all of the data to be present at the same time. This makes sense. My understanding of In general, although there are multiple exceptions for that, passing a promise to a function is meant as a kind of synchronisation mechanism. Indeed, in most cases, it is expected that you bind onto the promise, get the data out of it, and pass the data around. It is not a hard, unbreakable rule, but it is a general pattern of code that helps keep the code simple and the synchronisation apparent. In your case, you could use Does that make sense? As for
|
I've added some tests. Specifically, tests with some pausing (just so the promise is not a trivial, already resolved one) and some failing. I then fixed the exception handling in the Can you check the changes? Additionally, we should add an entry in the CHANGELOG. What name do you want to be referred by in this changelog? You can apply the following patch and add your name and push that as a commit:
|
The change looks good. I also pushed a change for the CHANGELOG. Thanks |
No description provided.