-
Notifications
You must be signed in to change notification settings - Fork 35
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
Testing of promises.ml
seems incomplete
#41
Comments
We will happily welcome pull requests to improve the state of affairs. It sounds reasonable to me to include a test that'd trigger the |
Indeed, it is very important the examples do remain simple and succinct! We are not sure tho how to address this issue in the most direct way; with the current API, I see at least two possible options, hard to say which one is easiest. How would you proceed to trigger |
Looking at the code again, it may be enough to change the scheduling policy https://github.com/ocaml-multicore/effects-examples/blob/master/promises.ml#L129-L130 it seems |
Coincidentally, this seems to be what I did in my toy implementation of async/await with multi-shot continuations, c.f. https://github.com/dhil/ocaml-multicont/blob/main/examples/async.ml#L103-L104 |
Thanks a lot for the details @dhil ; we will try that approach. [The other approach we were thinking is indeed to add a |
Dear effects examples maintainers,
thanks for the very nice examples on OCaml effects, they are very helpful!
@bhaktishh and I were looking into the
promises.ml
example, however we have noticed that the way the test are written, it seems that we never call theWait
effect, as all the promises are resolved immediately.It seems to us that having a more complete test could be useful, what do you think?
We have a few ideas on how to solve this, let us know what do you think?
I guess the first to try would be to decouple promise creation from resolution, but we'd like to hear your opinion before trying to do a pull request.
The text was updated successfully, but these errors were encountered: