Skip to content

Upgrade to Saturn 1.0 #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 domainslib.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/domainslib/issues"
depends: [
"dune" {>= "3.0"}
"ocaml" {>= "5.0"}
"saturn" {>= "0.4.0"}
"saturn" {>= "1.0.0"}
"domain-local-await" {>= "0.1.0"}
"kcas" {>= "0.3.0" & with-test}
"mirage-clock-unix" {with-test & >= "4.2.0"}
Expand Down
10 changes: 5 additions & 5 deletions lib/multi_channel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*)

module Ws_deque = Saturn.Work_stealing_deque.M
module Ws_deque = Saturn.Work_stealing_deque

type mutex_condvar = {
mutex: Mutex.t;
Expand Down Expand Up @@ -132,9 +132,9 @@ let rec recv_poll_loop mchan dls cur_offset =
let t = Array.unsafe_get offsets idx in
let channel = Array.unsafe_get mchan.channels t in
try
Ws_deque.steal channel
Ws_deque.steal_exn channel
with
| Exit ->
| Saturn.Work_stealing_deque.Empty ->
begin
Array.unsafe_set offsets idx (Array.unsafe_get offsets cur_offset);
Array.unsafe_set offsets cur_offset t;
Expand All @@ -144,9 +144,9 @@ let rec recv_poll_loop mchan dls cur_offset =

let recv_poll_with_dls mchan dls =
try
Ws_deque.pop (Array.unsafe_get mchan.channels dls.id)
Ws_deque.pop_exn (Array.unsafe_get mchan.channels dls.id)
with
| Exit ->
| Saturn.Work_stealing_deque.Empty ->
match Foreign_queue.pop_opt mchan.foreign_queue with
| None -> recv_poll_loop mchan dls 0
| Some v -> v
Expand Down