Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/manual.mld
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ val p : char Lwt.t = <abstr>
functions:

{ul
{- [Lwt.wakeup : 'a Lwt.u -> 'a -> unit]
{- [Lwt.resolve_next : 'a Lwt.u -> 'a -> unit]
fulfills the promise with a value.}
{- [Lwt.wakeup_exn : 'a Lwt.u -> exn -> unit]
{- [Lwt.resolve_next_exn : 'a Lwt.u -> exn -> unit]
rejects the promise with an exception.}}

Note that it is an error to try to resolve the same promise twice. [Lwt]
Expand All @@ -170,11 +170,11 @@ val p : char Lwt.t = <abstr>
# Lwt.state (Lwt.fail Exit);;
# let p, r = Lwt.wait ();;
# Lwt.state p;;
# Lwt.wakeup r 42;;
# Lwt.resolve_immediately r 42;;
# Lwt.state p;;
# let p, r = Lwt.wait ();;
# Lwt.state p;;
# Lwt.wakeup_exn r Exit;;
# Lwt.resolve_immediately_exn r Exit;;
# Lwt.state p;;
]}

Expand Down Expand Up @@ -323,7 +323,7 @@ val r2 : '_a Lwt.u = <abstr>
val p3 : '_a Lwt.t = <abstr>
# Lwt.state p3;;
- : '_a Lwt.state = Lwt.Sleep
# Lwt.wakeup r2 42;;
# Lwt.resolve_immediately r2 42;;
- : unit = ()
# Lwt.state p3;;
- : int Lwt.state = Lwt.Return 42
Expand Down
Loading
Loading