Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
5ea9a3f
remove bounded_queue
c-cube Jul 9, 2025
83acc18
deprecate fibers
c-cube Jul 9, 2025
2dcc858
remove Atomic stubs, we're already depending on >4.12
c-cube Jul 9, 2025
f8d5c56
remove version-dependent preprocessor
c-cube Jul 9, 2025
f6ad345
fib: remove preprocessor
c-cube Jul 9, 2025
50a44a7
forkjoin not longer optional
c-cube Jul 9, 2025
41561c3
deprecated moonpool_io
c-cube Jul 9, 2025
0ab9951
benchs: no preprocessor anymore
c-cube Jul 9, 2025
b9bbcf8
test do not need preprocessor anymore
c-cube Jul 9, 2025
2c1def1
breaking: require OCaml 5
c-cube Jul 9, 2025
1a64e73
Revert "deprecate fibers"
c-cube Sep 26, 2025
55e3e77
core: cleanup, and add a fined grained API for worker loop
c-cube Jul 9, 2025
bf90c32
wip lwt: event loop for moonpool directly inside lwt
c-cube Jul 9, 2025
295f22e
wip: lwt
c-cube Jul 9, 2025
543135a
wip: echo server using lwt
c-cube Jul 9, 2025
72d8c09
wip
c-cube Jul 9, 2025
6c4fb69
wip: lwt
c-cube Jul 9, 2025
f599340
wip: debug echo server
c-cube Jul 9, 2025
e09c809
deprecate moonpool.sync
c-cube Jul 10, 2025
f53dbe4
cleanup worker loop
c-cube Jul 10, 2025
796c4f6
feat lwt: improvements
c-cube Jul 10, 2025
a24bd74
feat worker_loop: always use `reschedule` in await
c-cube Jul 10, 2025
0fecde0
test: update Lwt tests to use the new Moonpool_lwt
c-cube Jul 10, 2025
6ae82f1
feat lwt: proper wakeup; add lwt_main_runner
c-cube Jul 10, 2025
da551ed
fix lwt tests
c-cube Jul 10, 2025
50b9dd9
fix CI for lwt tests
c-cube Jul 10, 2025
786d75d
comments/license for the Lwt hash server
c-cube Jul 11, 2025
122b3a6
feat lwt: make most functions work on any thread, not just the main
c-cube Sep 4, 2025
6c8c06b
update lwt test
c-cube Sep 4, 2025
63559f0
detail
c-cube Sep 4, 2025
1eef212
more sanity checks
c-cube Sep 4, 2025
e3be2ac
feat lwt: make sure we can setup/cleanup multiple times
c-cube Sep 4, 2025
00078d8
update test
c-cube Sep 4, 2025
9e814ec
lwt: handle fibers in moonpool_lwt
c-cube Sep 5, 2025
2afb5c1
adapt some tests for the lwt runner
c-cube Sep 5, 2025
01026fa
doc
c-cube Sep 5, 2025
86b64ae
fix lwt: make sure to wakeup loop in main
c-cube Sep 5, 2025
44edf60
fix tests
c-cube Sep 5, 2025
bf649f5
fix test
c-cube Sep 5, 2025
a42737a
format
c-cube Sep 5, 2025
2aabc30
fix test
c-cube Sep 5, 2025
f245f49
add Moonpool_lwt.spawn_lwt_ignore
c-cube Sep 8, 2025
8bd79c7
add Moonpool_lwt.on_lwt_thread
c-cube Sep 8, 2025
4f68531
detail
c-cube Sep 8, 2025
4e19719
modify signature for `Moonpool_lwt.run_in_lwt_and_await`
c-cube Sep 9, 2025
677ae5c
perf: fast path for Moonpool_lwt.run_in_lwt_and_await
c-cube Sep 24, 2025
2dbbad4
refactor moonpool_lwt
c-cube Sep 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Use OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: '5.0'
ocaml-compiler: '5.3'
dune-cache: true
allow-prerelease-opam: true

Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
os:
- ubuntu-latest
ocaml-compiler:
- '4.14'
- '5.2'
- '5.0'
- '5.3'

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

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

# install some depopts
- run: opam install thread-local-storage trace hmap
if: matrix.ocaml-compiler == '5.2'

- run: opam exec -- dune build --profile=release --force @install @runtest

compat:
Expand Down
3 changes: 0 additions & 3 deletions benchs/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
(executables
(names fib_rec pi primes)
(preprocess
(action
(run %{project_root}/src/cpp/cpp.exe %{input-file})))
(libraries moonpool moonpool.forkjoin unix trace trace-tef domainslib))
9 changes: 0 additions & 9 deletions benchs/pi.ml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ let run_par1 ~kind (num_steps : int) : float =
let pi = step *. Lock.get global_sum in
pi

[@@@ifge 5.0]

let run_fork_join ~kind num_steps : float =
let@ pool = with_pool ~kind () in

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

[@@@else_]

let run_fork_join _ =
failwith "fork join not available on this version of OCaml"

[@@@endif]

type mode =
| Sequential
| Par1
Expand Down
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(name moonpool)
(synopsis "Pools of threads supported by a pool of domains")
(depends
(ocaml (>= 4.14))
(ocaml (>= 5.0))
dune
(either (>= 1.0))
(trace :with-test)
Expand Down
2 changes: 1 addition & 1 deletion moonpool.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags: ["thread" "pool" "domain" "futures" "fork-join"]
homepage: "https://github.com/c-cube/moonpool"
bug-reports: "https://github.com/c-cube/moonpool/issues"
depends: [
"ocaml" {>= "4.14"}
"ocaml" {>= "5.0"}
"dune" {>= "3.0"}
"either" {>= "1.0"}
"trace" {with-test}
Expand Down
182 changes: 0 additions & 182 deletions src/core/bounded_queue.ml

This file was deleted.

82 changes: 0 additions & 82 deletions src/core/bounded_queue.mli

This file was deleted.

4 changes: 0 additions & 4 deletions src/core/chan.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ let close (self : _ t) : unit =
Mutex.unlock self.mutex;
Queue.iter Trigger.signal q

[@@@ifge 5.0]

let rec push (self : _ t) x : unit =
Mutex.lock self.mutex;

Expand Down Expand Up @@ -120,5 +118,3 @@ let rec pop (self : 'a t) : 'a =
Mutex.unlock self.mutex;
Trigger.await_exn tr;
pop self

[@@@endif]
4 changes: 0 additions & 4 deletions src/core/chan.mli
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ val close : _ t -> unit
(** Close the channel. Further push and pop calls will fail. This is idempotent.
*)

[@@@ifge 5.0]

val push : 'a t -> 'a -> unit
(** Push the value into the channel, suspending the current task if the channel
is currently full.
Expand All @@ -48,5 +46,3 @@ val pop_block_exn : 'a t -> 'a
The precautions around blocking from inside a thread pool
are the same as explained in {!Fut.wait_block}. *)
*)

[@@@endif]
5 changes: 1 addition & 4 deletions src/core/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@
moonpool.dpool
(re_export picos))
(flags :standard -open Moonpool_private)
(private_modules util_pool_)
(preprocess
(action
(run %{project_root}/src/cpp/cpp.exe %{input-file}))))
(private_modules util_pool_))
Loading