Skip to content

Commit

Permalink
refactor(async): s/fill/fill_exn/g
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>

<!-- ps-id: aa9ea854-2881-48ad-b168-63dba45d8c25 -->
  • Loading branch information
rgrinberg committed Jun 24, 2024
1 parent 7020e63 commit 86f2802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cohttp-async/src/client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module Connection = struct
req oc
>>= fun () ->
read_response ic >>= fun (resp, body) ->
Ivar.fill res (resp, `Pipe body);
Ivar.fill_exn res (resp, `Pipe body);
(* block starting any more requests until the consumer has finished reading this request *)
Pipe.closed body)
|> don't_wait_for;
Expand Down
7 changes: 4 additions & 3 deletions cohttp-curl-async/src/cohttp_curl_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module Context = struct
| None -> ()
| Some w ->
Hashtbl.remove t.wakeners h;
Ivar.fill w code);
Ivar.fill_exn w code);
finished s
in
let on_readable fd =
Expand Down Expand Up @@ -102,7 +102,7 @@ module Context = struct
| Some _, true -> ()
| None, true -> set_event (Some (create_event fd what))
| Some ivar, false ->
Ivar.fill ivar ();
Ivar.fill_exn ivar ();
set_event None
in
update current.fd
Expand Down Expand Up @@ -168,7 +168,8 @@ module Request = struct
timeout
in
Cohttp_curl.Request.create ?timeout_ms ?headers method_ ~uri ~input
~output ~on_response:(Ivar.fill response_ready)
~output
~on_response:(Ivar.fill_exn response_ready)
in
{ base; response_ready = Ivar.read response_ready; body_ready }
end
Expand Down

0 comments on commit 86f2802

Please sign in to comment.