-
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
Adding an Lwt_retry
library
#1028
Comments
I've read the interface and had a glance at the example. It's nice. Few things, of varying level of importance: There's general reticence in adding things into lwt because of the quite strict backwards compatibility requirement which means maintenance burden tends to accrue. The function One thing that needs to be made clear in the mli is whether the The documentation as-written seem to suggest the former (“The stream will continue until the computation succeeds or produces a fatal error.” kind of suggests that the stream just keeps goign whatever happens). But the type of I wonder if using |
Thank you for the notes! I will take them into account in preparing a PR to port the library over.
We definitely want the latter IMO, and that is what is intended. The reason being that, iiuc, it should be easy to convert the lazy version into a computation that will run in the background if that's desired, but not possible to go the other way around. I have no objection to switching to |
Maybe start with a PR closer to the original library rather than switching to |
Hello! Thank you for all the work maintaining Lwt, which is a lovely package :)
In our work on the ecosystem infrastructure we have need for retries in many cases, in order to make our systems more robust against transient failures. We have written a tiny library to meet this need, currently called Lwt_retry. It depends only on
lwt
andlwt.unix
and it amounts to a handful of combinators overLwt.t
andLwt_stream.t
.Would you be interested in including this library into Lwt? If so, I would be happy to open a PR and make any alterations necessary so that it would be a good fit. If not, we will likely try publish this little utility as a standalone, as we need to use it across several code bases.
To get a sense for how we are using this, you can see an example of its usage and the unit tests.
The text was updated successfully, but these errors were encountered: