Skip to content

Commit

Permalink
Initialize the rng of external threads (#47956)
Browse files Browse the repository at this point in the history
* Initialize the rng of external threads with uv_random

(cherry picked from commit 4c2a431)
  • Loading branch information
gbaraldi authored and KristofferC committed Dec 28, 2022
1 parent e165c37 commit e53a8d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ JL_DLLEXPORT jl_gcframe_t **jl_adopt_thread(void)
// warning: this changes `jl_current_task`, so be careful not to call that from this function
jl_task_t *ct = jl_init_root_task(ptls, stack_lo, stack_hi);
JL_GC_PROMISE_ROOTED(ct);

uv_random(NULL, NULL, &ct->rngState, sizeof(ct->rngState), 0, NULL);
return &ct->gcstack;
}

Expand Down

0 comments on commit e53a8d2

Please sign in to comment.