Skip to content

Commit

Permalink
Warn about both operations succeeding in Fiber.first
Browse files Browse the repository at this point in the history
Closes #356.
  • Loading branch information
talex5 committed Oct 29, 2022
1 parent 849391e commit fe96fc1
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 fe96fc1

Please sign in to comment.