diff options
| author | ruki <[email protected]> | 2021-05-19 09:37:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-19 09:37:00 +0800 |
| commit | 16a421fdcae87814b8ca5fbb53c63ddfcd688380 (patch) | |
| tree | 7ebed040cd7a4fc5f9b250731b8ffc4ba4a3f058 /xmake/modules/private/async | |
| parent | 376b206b27edafec967e965ffd72f220f604e609 (diff) | |
| parent | fb789657a2b0512eac5a09531288f2d5130c5a48 (diff) | |
Merge pull request #1416 from xmake-io/archlinux
add archlinux ci
Diffstat (limited to 'xmake/modules/private/async')
| -rw-r--r-- | xmake/modules/private/async/runjobs.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua index 487d11798..ed007291c 100644 --- a/xmake/modules/private/async/runjobs.lua +++ b/xmake/modules/private/async/runjobs.lua @@ -73,6 +73,14 @@ function main(name, jobs, opt) progress_helper = progress.new(nil, opt) end + -- isolate environments + local is_isolated = false + local co_running = scheduler.co_running() + if co_running and opt.isolate then + is_isolated = co_running:is_isolated() + co_running:isolate(true) + end + -- run timer local stop = false local running_jobs_indices = {} @@ -235,6 +243,11 @@ function main(name, jobs, opt) -- wait all jobs exited scheduler.co_group_wait(group_name) + -- restore isolated environments + if co_running and opt.isolate then + co_running:isolate(is_isolated) + end + -- stop timer stop = true |
