File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ module Xt = struct
226
226
done
227
227
in
228
228
try
229
- if must_be_done_in_this_tx then
229
+ if must_be_done_in_this_tx then begin
230
230
(* If the old buckets have already been accessed, we cannot perform
231
231
rehashing outside of the transaction. In this case rehashing
232
232
becomes linearithmic, O(n*log(n)), because that is the best that
@@ -238,14 +238,17 @@ module Xt = struct
238
238
(* If state is modified outside our expensive tx would fail. *)
239
239
if Loc. fenceless_get state != initial_state then Retry. invalid () ;
240
240
rehash_a_few_buckets ~xt
241
- done
242
- else
241
+ done ;
242
+ r
243
+ end
244
+ else begin
243
245
(* When possible, rehashing is performed cooperatively a few buckets
244
246
at a time. This gives expected linear time, O(n). *)
245
247
while true do
246
248
Xt. commit { tx = rehash_a_few_buckets }
247
249
done ;
248
- r
250
+ r
251
+ end
249
252
with Done -> r
250
253
end
251
254
| Snapshot { state; snapshot } -> begin
You can’t perform that action at this time.
0 commit comments