Relax some main thread requirements around waiting for jobs

This is now correctly per-parser so the thread should no longer matter.
This commit is contained in:
ridiculousfish 2020-09-13 17:54:52 -07:00
parent 1ba9c7ea56
commit 2a8e104cc8
2 changed files with 0 additions and 4 deletions

View file

@ -170,10 +170,7 @@ static bool find_job_by_name(const wchar_t *proc, std::vector<job_id_t> &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<int> 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);

View file

@ -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);
}