Merged
Conversation
If we're cancelled while waiting for a condition, we should still take the lock again before returning (as Lwt does). Also, make the `mutex` required on `await` and have a separate `await_no_mutex` for that case. This is to make it harder to forget the mutex if you need it.
talex5
added a commit
to talex5/opam-repository
that referenced
this pull request
Aug 26, 2022
CHANGES: New features: - Add `Eio.Condition` (@TheLortex @talex5 ocaml-multicore/eio#277). Allows a fiber to wait for some condition to become true. - Add `Eio.Net.getaddrinfo` and `getnameinfo` (@bikallem @talex5 ocaml-multicore/eio#278 ocaml-multicore/eio#288 ocaml-multicore/eio#291). Convert between host names and addresses. - Add `Eio.Debug` (@talex5 ocaml-multicore/eio#276). Currently, this allows overriding the `traceln` function. - `Buf_write.create`: make switch optional (@talex5 ocaml-multicore/eio#283). This makes things easier for people porting code from Faraday. Bug fixes: - Allow sharing of libuv poll handles (@patricoferris @talex5 ocaml-multicore/eio#279). Luv doesn't allow two callers to watch the same file handle, so we need to handle that in Eio. Other changes: - Upgrade to uring 0.4 (@talex5 ocaml-multicore/eio#290). - Mention `Mutex`, `Semaphore` and `Condition` in the README (@talex5 ocaml-multicore/eio#281).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an updated version of the conditions part of #210. The changes are:
await ?mutex tintoawait_no_mutex tandawait t mutex. This makes it harder to forget the mutex by accident, and looks more like the stdlib API./cc @TheLortex