Skip to content

Improve exception safety of some Lwt_list APIs - #499

Merged
aantron merged 3 commits into
masterfrom
lwt_list-exceptions
Nov 22, 2017
Merged

aantron merged 3 commits into
masterfrom
lwt_list-exceptions

Conversation

@aantron

@aantron aantron commented Nov 9, 2017

Copy link
Copy Markdown
Collaborator

Before the last commit in this PR, if Lwt_list.iter_s, iter_p, map_s, map_p raised an exception (immediately) after being applied to a list element, the exception could leak out of the list combinator (iter_s, etc). This seems like an incorrect behavior: the promise that the combinator ordinarily creates should still be created, but rejected with the exception instead.

Other functions in Lwt_list still have this problem, e.g. iteri_s. They should be fixed in follow-on PRs (I'll open an issue to review Lwt_list in detail). I fixed these four now mainly because they have tests, and those tests are affected by fixing #329, which is about the exception safety of Lwt.bind and many other Lwt core functions, among other things.

This commit is the composition of a bunch of renamings, moving code, and
refactoring to limit scope.
@aantron aantron added this to the 3.2.0 milestone Nov 9, 2017
@aantron
aantron merged commit fa22289 into master Nov 22, 2017
@aantron
aantron deleted the lwt_list-exceptions branch December 23, 2017 00:10
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

Successfully merging this pull request may close these issues.

1 participant