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
226226 done
227227 in
228228 try
229- if must_be_done_in_this_tx then
229+ if must_be_done_in_this_tx then begin
230230 (* If the old buckets have already been accessed, we cannot perform
231231 rehashing outside of the transaction. In this case rehashing
232232 becomes linearithmic, O(n*log(n)), because that is the best that
@@ -238,14 +238,17 @@ module Xt = struct
238238 (* If state is modified outside our expensive tx would fail. *)
239239 if Loc. fenceless_get state != initial_state then Retry. invalid () ;
240240 rehash_a_few_buckets ~xt
241- done
242- else
241+ done ;
242+ r
243+ end
244+ else begin
243245 (* When possible, rehashing is performed cooperatively a few buckets
244246 at a time. This gives expected linear time, O(n). *)
245247 while true do
246248 Xt. commit { tx = rehash_a_few_buckets }
247249 done ;
248- r
250+ r
251+ end
249252 with Done -> r
250253 end
251254 | Snapshot { state; snapshot } -> begin
You can’t perform that action at this time.
0 commit comments