Skip to content

Commit 7d1320e

Browse files
committed
Update to OCaml 5.4.1
1 parent 8a7e80d commit 7d1320e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- ubuntu-latest
1616
- macos-latest
1717
ocaml-compiler:
18-
- ocaml-variants.5.3.0+trunk
18+
- "5.4.1"
1919

2020
runs-on: ${{ matrix.os }}
2121

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ The original implementation of Multicore OCaml allowed a user to `Obj.clone_cont
4141
To run the examples with OCaml, be sure to install [Opam with these instructions](https://opam.ocaml.org/doc/Install.html). These examples use the new effect syntax introduced with OCaml 5.3 and onwards. If you wish to see the examples which used the underlying effect functions directly, please checkout the `5.1.1` tag of this repository instead.
4242

4343
```bash
44-
# After cloning this repository, create a 5.3 switch
44+
# After cloning this repository, create a 5.4.1 switch
4545
opam update
46-
opam switch create 5.3.0+trunk
46+
opam switch create 5.4.1
4747
opam install . --deps-only
4848
```
4949

sched.ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ type _ eff += Yield : unit eff
44
let fork f = Effect.perform (Fork f)
55
let yield () = Effect.perform Yield
66

7-
(* A concurrent round-robin scheduler *)
7+
(* A concurrent round-robin scheduler using
8+
* effect handlers *)
89
let run main =
910
let run_q = Queue.create () in
1011
let enqueue k = Queue.push k run_q in
1112
let dequeue () =
12-
if Queue.is_empty run_q then () else Effect.Deep.continue (Queue.pop run_q) ()
13+
if Queue.is_empty run_q
14+
then ()
15+
else Effect.Deep.continue (Queue.pop run_q) ()
1316
in
1417
let rec spawn f =
1518
(* Effect handler => instantiates fiber *)

0 commit comments

Comments
 (0)