Skip to content

Commit

Permalink
Fix Async deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgilchrist committed Aug 16, 2024
1 parent 9ebdbe9 commit d4ad63e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
unreleased
--------------
- gluten-async: update async and core to v0.17.0
([#78)(https://github.com/anmonteiro/gluten/pull/78))

0.5.1 2024-06-04
--------------

Expand Down
6 changes: 3 additions & 3 deletions async/gluten_async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct
Buffer.put
~f:(fun buf ~off ~len k -> Async.upon (Io.read socket buf ~off ~len) k)
read_buffer
(fun n -> Ivar.fill ivar n);
(fun n -> Ivar.fill_exn ivar n);
Ivar.read ivar

let start :
Expand Down Expand Up @@ -76,7 +76,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct
Runtime.yield_reader t reader_thread;
Deferred.return ()
| `Close ->
Ivar.fill read_complete ();
Ivar.fill_exn read_complete ();
Io.shutdown_receive socket;
Deferred.return ()
in
Expand All @@ -91,7 +91,7 @@ module Make_IO_Loop (Io : Gluten_async_intf.IO) = struct
Runtime.report_write_result t result;
writer_thread ()
| `Yield -> Runtime.yield_writer t writer_thread
| `Close _ -> Ivar.fill write_complete ()
| `Close _ -> Ivar.fill_exn write_complete ()
in
let conn_monitor = Monitor.create () in
Scheduler.within ~monitor:conn_monitor reader_thread;
Expand Down
4 changes: 2 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
(faraday-async
(>= "0.7.3"))
(async
(>= "v0.15.0"))
(>= "v0.17.0"))
(core
(>= "v0.15.0")))
(>= "v0.17.0")))
(depopts async_ssl tls-async))

(package
Expand Down
4 changes: 2 additions & 2 deletions gluten-async.opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ depends: [
"ocaml" {>= "4.08.0"}
"gluten" {= version}
"faraday-async" {>= "0.7.3"}
"async" {>= "v0.15.0"}
"core" {>= "v0.15.0"}
"async" {>= "v0.17.0"}
"core" {>= "v0.17.0"}
"odoc" {with-doc}
]
depopts: ["async_ssl" "tls-async"]
Expand Down

0 comments on commit d4ad63e

Please sign in to comment.