diff options
| author | ruki <[email protected]> | 2021-09-18 14:56:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-09-18 14:56:16 +0800 |
| commit | 084bcfde400776e502c9bf1b30d86c514666a27d (patch) | |
| tree | 85f37217159a35234960de1ce3b8db39e7c07349 | |
| parent | 4767603ee406aa26567edb082745aa3581bd9803 (diff) | |
fix scheduler
| -rw-r--r-- | tests/projects/package/multiconfig/xmake-requires.lock | 9 | ||||
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/xmake-requires.lock | 276 | ||||
| -rw-r--r-- | xmake/core/base/scheduler.lua | 14 |
3 files changed, 145 insertions, 154 deletions
diff --git a/tests/projects/package/multiconfig/xmake-requires.lock b/tests/projects/package/multiconfig/xmake-requires.lock index af73d677c..a49fd4b60 100644 --- a/tests/projects/package/multiconfig/xmake-requires.lock +++ b/tests/projects/package/multiconfig/xmake-requires.lock @@ -5,25 +5,22 @@ ["macosx|x86_64"] = { ["zlib#31fecfc4"] = { repo = { - branch = "master", commit = "eda7adee81bac151f87c507030cc0dd8ab299462", - url = "https://gitee.com/tboox/xmake-repo.git" + url = "/Users/ruki/projects/personal/xmake-repo/" }, version = "1.2.11" }, ["zlib~debug#55833b12"] = { repo = { - branch = "master", commit = "eda7adee81bac151f87c507030cc0dd8ab299462", - url = "https://gitee.com/tboox/xmake-repo.git" + url = "/Users/ruki/projects/personal/xmake-repo/" }, version = "1.2.11" }, ["zlib~shared#b6ab42cb"] = { repo = { - branch = "master", commit = "eda7adee81bac151f87c507030cc0dd8ab299462", - url = "https://gitee.com/tboox/xmake-repo.git" + url = "/Users/ruki/projects/personal/xmake-repo/" }, version = "1.2.11" } diff --git a/tests/projects/package/toolchain_muslcc/xmake-requires.lock b/tests/projects/package/toolchain_muslcc/xmake-requires.lock index 9b6e40634..cab4f02dc 100644 --- a/tests/projects/package/toolchain_muslcc/xmake-requires.lock +++ b/tests/projects/package/toolchain_muslcc/xmake-requires.lock @@ -1,145 +1,133 @@ -{
- __meta__ = {
- version = "1.0"
- },
- ["macosx|x86_64"] = {
- ["autoconf#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "4498f11267de5112199152ab030ed139c985ad5a",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "2.71"
- },
- ["automake#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "1.16.4"
- },
- ["cmake#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "4498f11267de5112199152ab030ed139c985ad5a",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "3.21.0"
- },
- ["gmp#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "c1b4838c9b1e7a2c52d9bf1a9beafeaee7305e30",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "6.2.1"
- },
- ["libisl 0.22#67114504"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "0.22"
- },
- ["libogg#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "v1.3.4"
- },
- ["libplist#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "2.2.0"
- },
- ["libtool#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "2.4.6"
- },
- ["m4#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "c1b4838c9b1e7a2c52d9bf1a9beafeaee7305e30",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "1.4.19"
- },
- ["muslcc#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "20210202"
- },
- ["pkg-config#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "c1b4838c9b1e7a2c52d9bf1a9beafeaee7305e30",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "0.29.2"
- },
- ["zlib#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "1.2.11"
- }
- },
- ["windows|x64"] = {
- ["cmake#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "8e8c5e4d1c7e8b047b23333594d23b4b85163aed",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "3.21.0"
- },
- ["libogg#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "2b1cb74b289ae3221241985db4401a495c42fde3",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "v1.3.4"
- },
- ["make#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "2b1cb74b289ae3221241985db4401a495c42fde3",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "4.3"
- },
- ["muslcc#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "2b1cb74b289ae3221241985db4401a495c42fde3",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "20210202"
- },
- ["zlib#31fecfc4"] = {
- repo = {
- branch = "master",
- commit = "2b1cb74b289ae3221241985db4401a495c42fde3",
- url = "https://gitee.com/tboox/xmake-repo.git"
- },
- version = "1.2.11"
- }
- }
+{ + __meta__ = { + version = "1.0" + }, + ["macosx|x86_64"] = { + ["autoconf#31fecfc4"] = { + repo = { + commit = "4498f11267de5112199152ab030ed139c985ad5a", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "2.71" + }, + ["automake#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "1.16.4" + }, + ["cmake#31fecfc4"] = { + repo = { + commit = "4498f11267de5112199152ab030ed139c985ad5a", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "3.21.0" + }, + ["gmp#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "6.2.1" + }, + ["libisl 0.22#67114504"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "0.22" + }, + ["libogg#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "v1.3.4" + }, + ["libplist#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "2.2.0" + }, + ["libtool#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "2.4.6" + }, + ["m4#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "1.4.19" + }, + ["muslcc#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "20210202" + }, + ["pkg-config#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "0.29.2" + }, + ["zlib#31fecfc4"] = { + repo = { + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", + url = "/Users/ruki/projects/personal/xmake-repo/" + }, + version = "1.2.11" + } + }, + ["windows|x64"] = { + ["cmake#31fecfc4"] = { + repo = { + branch = "master", + commit = "8e8c5e4d1c7e8b047b23333594d23b4b85163aed", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "3.21.0" + }, + ["libogg#31fecfc4"] = { + repo = { + branch = "master", + commit = "2b1cb74b289ae3221241985db4401a495c42fde3", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "v1.3.4" + }, + ["make#31fecfc4"] = { + repo = { + branch = "master", + commit = "2b1cb74b289ae3221241985db4401a495c42fde3", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "4.3" + }, + ["muslcc#31fecfc4"] = { + repo = { + branch = "master", + commit = "2b1cb74b289ae3221241985db4401a495c42fde3", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "20210202" + }, + ["zlib#31fecfc4"] = { + repo = { + branch = "master", + commit = "2b1cb74b289ae3221241985db4401a495c42fde3", + url = "https://gitee.com/tboox/xmake-repo.git" + }, + version = "1.2.11" + } + } }
\ No newline at end of file diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua index 1d92f0e9b..f4928a887 100644 --- a/xmake/core/base/scheduler.lua +++ b/xmake/core/base/scheduler.lua @@ -302,6 +302,7 @@ function scheduler:_co_groups_resume() local co_groups = self._CO_GROUPS if co_groups then local co_groups_waiting = self._CO_GROUPS_WAITING + local co_resumed_list = {} for name, co_group in pairs(co_groups) do -- get coroutine and limit in waiting group @@ -326,10 +327,15 @@ function scheduler:_co_groups_resume() if count >= limit and co_waiting and co_waiting:is_suspended() then resumed_count = resumed_count + 1 self._CO_GROUPS_WAITING[name] = nil - local ok, errors = self:co_resume(co_waiting) - if not ok then - return -1, errors - end + table.insert(co_resumed_list, co_waiting) + end + end + end + if #co_resumed_list > 0 then + for _, co_waiting in ipairs(co_resumed_list) do + local ok, errors = self:co_resume(co_waiting) + if not ok then + return -1, errors end end end |
