Skip to content

Commit d79200f

Browse files
authored
Merge pull request #39 from c-cube/simon/reduce-scope-2025-07-09
reduce scope of the library a bit
2 parents 867cbd2 + 1a64e73 commit d79200f

39 files changed

+22
-693
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Use OCaml
1616
uses: ocaml/setup-ocaml@v3
1717
with:
18-
ocaml-compiler: '5.0'
18+
ocaml-compiler: '5.3'
1919
dune-cache: true
2020
allow-prerelease-opam: true
2121

.github/workflows/main.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
os:
1717
- ubuntu-latest
1818
ocaml-compiler:
19-
- '4.14'
20-
- '5.2'
19+
- '5.0'
20+
- '5.3'
2121

2222
runs-on: ${{ matrix.os }}
2323
steps:
@@ -32,15 +32,10 @@ jobs:
3232
- run: opam pin picos 0.6.0 -y -n
3333

3434
- run: opam install -t moonpool moonpool-lwt moonpool-io --deps-only
35-
if: matrix.ocaml-compiler == '5.2'
36-
- run: opam install -t moonpool --deps-only
37-
if: matrix.ocaml-compiler != '5.2'
3835
- run: opam exec -- dune build @install
3936

4037
# install some depopts
4138
- run: opam install thread-local-storage trace hmap
42-
if: matrix.ocaml-compiler == '5.2'
43-
4439
- run: opam exec -- dune build --profile=release --force @install @runtest
4540

4641
compat:

benchs/dune

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
(executables
22
(names fib_rec pi primes)
3-
(preprocess
4-
(action
5-
(run %{project_root}/src/cpp/cpp.exe %{input-file})))
63
(libraries moonpool moonpool.forkjoin unix trace trace-tef domainslib))

benchs/pi.ml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ let run_par1 ~kind (num_steps : int) : float =
6666
let pi = step *. Lock.get global_sum in
6767
pi
6868

69-
[@@@ifge 5.0]
70-
7169
let run_fork_join ~kind num_steps : float =
7270
let@ pool = with_pool ~kind () in
7371

@@ -92,13 +90,6 @@ let run_fork_join ~kind num_steps : float =
9290
let pi = step *. Lock.get global_sum in
9391
pi
9492

95-
[@@@else_]
96-
97-
let run_fork_join _ =
98-
failwith "fork join not available on this version of OCaml"
99-
100-
[@@@endif]
101-
10293
type mode =
10394
| Sequential
10495
| Par1

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
(name moonpool)
1717
(synopsis "Pools of threads supported by a pool of domains")
1818
(depends
19-
(ocaml (>= 4.14))
19+
(ocaml (>= 5.0))
2020
dune
2121
(either (>= 1.0))
2222
(trace :with-test)

moonpool.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags: ["thread" "pool" "domain" "futures" "fork-join"]
99
homepage: "https://github.com/c-cube/moonpool"
1010
bug-reports: "https://github.com/c-cube/moonpool/issues"
1111
depends: [
12-
"ocaml" {>= "4.14"}
12+
"ocaml" {>= "5.0"}
1313
"dune" {>= "3.0"}
1414
"either" {>= "1.0"}
1515
"trace" {with-test}

src/core/bounded_queue.ml

Lines changed: 0 additions & 182 deletions
This file was deleted.

src/core/bounded_queue.mli

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/core/chan.ml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ let close (self : _ t) : unit =
7070
Mutex.unlock self.mutex;
7171
Queue.iter Trigger.signal q
7272

73-
[@@@ifge 5.0]
74-
7573
let rec push (self : _ t) x : unit =
7674
Mutex.lock self.mutex;
7775

@@ -120,5 +118,3 @@ let rec pop (self : 'a t) : 'a =
120118
Mutex.unlock self.mutex;
121119
Trigger.await_exn tr;
122120
pop self
123-
124-
[@@@endif]

src/core/chan.mli

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ val close : _ t -> unit
2828
(** Close the channel. Further push and pop calls will fail. This is idempotent.
2929
*)
3030

31-
[@@@ifge 5.0]
32-
3331
val push : 'a t -> 'a -> unit
3432
(** Push the value into the channel, suspending the current task if the channel
3533
is currently full.
@@ -48,5 +46,3 @@ val pop_block_exn : 'a t -> 'a
4846
The precautions around blocking from inside a thread pool
4947
are the same as explained in {!Fut.wait_block}. *)
5048
*)
51-
52-
[@@@endif]

0 commit comments

Comments
 (0)