We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0a3247 commit 8fda53cCopy full SHA for 8fda53c
examples/limiter/dune
@@ -0,0 +1,3 @@
1
+(executable
2
+ (name main)
3
+ (libraries eio.mock))
examples/limiter/main.ml
@@ -0,0 +1,14 @@
+(* This runs jobs 4 at a time. It's useful to check eio-trace's layout algorithm. *)
+
+open Eio.Std
4
5
+let lock = Eio.Mutex.create ()
6
7
+let main () =
8
+ List.init 15 Fun.id
9
+ |> Fiber.List.iter ~max_fibers:4 (fun i ->
10
+ if i = 4 then Fiber.both Fiber.yield Fiber.yield;
11
+ Eio.Mutex.use_ro lock Fiber.yield)
12
13
+let () =
14
+ Eio_mock.Backend.run main
0 commit comments