Skip to content

Commit

Permalink
threads: move safepoint into loop
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and johanmon committed Jul 5, 2021
1 parent 0731336 commit 785a7a6
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 785a7a6

Please sign in to comment.