Skip to content

Commit

Permalink
Merge pull request #41411 from JuliaLang/jn/41407
Browse files Browse the repository at this point in the history
threads: move safepoint into loop
  • Loading branch information
vchuravy authored Jun 30, 2021
2 parents 71bf608 + a941243 commit 94b9d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/partr.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ static inline jl_task_t *multiq_deletemin(void)
int16_t prio1, prio2;
jl_task_t *task;
retry:
jl_gc_safepoint();
for (i = 0; i < heap_p; ++i) {
rn1 = cong(heap_p, cong_unbias, &ptls->rngseed);
rn2 = cong(heap_p, cong_unbias, &ptls->rngseed);
Expand Down Expand Up @@ -397,7 +398,6 @@ static jl_task_t *get_next_task(jl_value_t *trypoptask, jl_value_t *q)
jl_set_task_tid(task, self);
return task;
}
jl_gc_safepoint();
return multiq_deletemin();
}

Expand Down

0 comments on commit 94b9d66

Please sign in to comment.