Skip to content

Commit ea77475

Browse files
authored
Merge pull request #129 from ocaml-multicore/fix_saturn_dep
Upgrade to Saturn 1.0
2 parents 731f088 + 894a89c commit ea77475

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

domainslib.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ bug-reports: "https://github.com/ocaml-multicore/domainslib/issues"
1010
depends: [
1111
"dune" {>= "3.0"}
1212
"ocaml" {>= "5.0"}
13-
"saturn" {>= "0.4.0"}
13+
"saturn" {>= "1.0.0"}
1414
"domain-local-await" {>= "0.1.0"}
1515
"kcas" {>= "0.3.0" & with-test}
1616
"mirage-clock-unix" {with-test & >= "4.2.0"}

lib/multi_channel.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1515
*)
1616

17-
module Ws_deque = Saturn.Work_stealing_deque.M
17+
module Ws_deque = Saturn.Work_stealing_deque
1818

1919
type mutex_condvar = {
2020
mutex: Mutex.t;
@@ -132,9 +132,9 @@ let rec recv_poll_loop mchan dls cur_offset =
132132
let t = Array.unsafe_get offsets idx in
133133
let channel = Array.unsafe_get mchan.channels t in
134134
try
135-
Ws_deque.steal channel
135+
Ws_deque.steal_exn channel
136136
with
137-
| Exit ->
137+
| Saturn.Work_stealing_deque.Empty ->
138138
begin
139139
Array.unsafe_set offsets idx (Array.unsafe_get offsets cur_offset);
140140
Array.unsafe_set offsets cur_offset t;
@@ -144,9 +144,9 @@ let rec recv_poll_loop mchan dls cur_offset =
144144

145145
let recv_poll_with_dls mchan dls =
146146
try
147-
Ws_deque.pop (Array.unsafe_get mchan.channels dls.id)
147+
Ws_deque.pop_exn (Array.unsafe_get mchan.channels dls.id)
148148
with
149-
| Exit ->
149+
| Saturn.Work_stealing_deque.Empty ->
150150
match Foreign_queue.pop_opt mchan.foreign_queue with
151151
| None -> recv_poll_loop mchan dls 0
152152
| Some v -> v

0 commit comments

Comments
 (0)