Skip to content

Commit

Permalink
Merge pull request #358 from talex5/warn-first
Browse files Browse the repository at this point in the history
Warn about both operations succeeding in Fiber.first
  • Loading branch information
talex5 authored Oct 29, 2022
2 parents 849391e + fe96fc1 commit 35aed19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib_eio/core/eio__core.mli
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ module Fiber : sig
As with [both], [f] runs immediately and [g] is scheduled next, ahead of any other queued work.
If both fibers fail, {!Exn.combine} is used to combine the exceptions. *)
If both fibers fail, {!Exn.combine} is used to combine the exceptions.
Warning: it is always possible that {i both} operations will succeed (and one result will be thrown away).
This is because there is a period of time after the first operation succeeds,
but before its fiber finishes, during which the other operation may also succeed. *)

val any : (unit -> 'a) list -> 'a
(** [any fs] is like [first], but for any number of fibers.
Expand Down

0 comments on commit 35aed19

Please sign in to comment.