Skip to content

Commit a941243

Browse files
committed
threads: move safepoint into loop
Fixes #41407
1 parent db71a65 commit a941243

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/partr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static inline jl_task_t *multiq_deletemin(void)
159159
int16_t prio1, prio2;
160160
jl_task_t *task;
161161
retry:
162+
jl_gc_safepoint();
162163
for (i = 0; i < heap_p; ++i) {
163164
rn1 = cong(heap_p, cong_unbias, &ptls->rngseed);
164165
rn2 = cong(heap_p, cong_unbias, &ptls->rngseed);
@@ -397,7 +398,6 @@ static jl_task_t *get_next_task(jl_value_t *trypoptask, jl_value_t *q)
397398
jl_set_task_tid(task, self);
398399
return task;
399400
}
400-
jl_gc_safepoint();
401401
return multiq_deletemin();
402402
}
403403

0 commit comments

Comments
 (0)