From 2a8e104cc8b26cf49626b250e66ca8886828b6c8 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 13 Sep 2020 17:54:52 -0700 Subject: [PATCH] Relax some main thread requirements around waiting for jobs This is now correctly per-parser so the thread should no longer matter. --- src/builtin_wait.cpp | 3 --- src/proc.cpp | 1 - 2 files changed, 4 deletions(-) diff --git a/src/builtin_wait.cpp b/src/builtin_wait.cpp index 0d60c42a4..e450ffafc 100644 --- a/src/builtin_wait.cpp +++ b/src/builtin_wait.cpp @@ -170,10 +170,7 @@ static bool find_job_by_name(const wchar_t *proc, std::vector &ids, return found; } -/// The following function is invoked on the main thread, because the job operation is not thread -/// safe. It waits for child jobs, not for child processes individually. maybe_t builtin_wait(parser_t &parser, io_streams_t &streams, wchar_t **argv) { - ASSERT_IS_MAIN_THREAD(); int retval = STATUS_CMD_OK; const wchar_t *cmd = argv[0]; int argc = builtin_count_args(argv); diff --git a/src/proc.cpp b/src/proc.cpp index 1c7f4f7f9..49d32b41b 100644 --- a/src/proc.cpp +++ b/src/proc.cpp @@ -1070,7 +1070,6 @@ void proc_sanity_check(const parser_t &parser) { } void proc_wait_any(parser_t &parser) { - ASSERT_IS_MAIN_THREAD(); process_mark_finished_children(parser, true /* block_ok */); process_clean_after_marking(parser, parser.libdata().is_interactive); }