Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worklist changes for partr (1/3) #30806

Merged
merged 5 commits into from
Mar 19, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
run uv-run only on tid 0
  • Loading branch information
vtjnash committed Jan 25, 2019
commit bf7baa4a64739692418f48f051c27e0b870e9793
16 changes: 8 additions & 8 deletions src/jl_uv.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,33 +181,33 @@ JL_DLLEXPORT void *jl_uv_write_handle(uv_write_t *req) { return req->handle; }
JL_DLLEXPORT int jl_run_once(uv_loop_t *loop)
{
jl_ptls_t ptls = jl_get_ptls_states();
if (loop) {
if (loop && ptls->tid == 0) {
loop->stop_flag = 0;
jl_gc_safepoint_(ptls);
return uv_run(loop,UV_RUN_ONCE);
return uv_run(loop, UV_RUN_ONCE);
}
else return 0;
return 0;
}

JL_DLLEXPORT void jl_run_event_loop(uv_loop_t *loop)
{
jl_ptls_t ptls = jl_get_ptls_states();
if (loop) {
if (loop && ptls->tid == 0) {
loop->stop_flag = 0;
jl_gc_safepoint_(ptls);
uv_run(loop,UV_RUN_DEFAULT);
uv_run(loop, UV_RUN_DEFAULT);
}
}

JL_DLLEXPORT int jl_process_events(uv_loop_t *loop)
{
jl_ptls_t ptls = jl_get_ptls_states();
if (loop) {
if (loop && ptls->tid == 0) {
loop->stop_flag = 0;
jl_gc_safepoint_(ptls);
return uv_run(loop,UV_RUN_NOWAIT);
return uv_run(loop, UV_RUN_NOWAIT);
}
else return 0;
return 0;
}

static void jl_proc_exit_cleanup(uv_process_t *process, int64_t exit_status, int term_signal)
Expand Down