diff options
| -rw-r--r-- | xmake/modules/private/service/distcc_build/client.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xmake/modules/private/service/distcc_build/client.lua b/xmake/modules/private/service/distcc_build/client.lua index 633e3b89b..599e123b1 100644 --- a/xmake/modules/private/service/distcc_build/client.lua +++ b/xmake/modules/private/service/distcc_build/client.lua @@ -192,6 +192,11 @@ function distcc_build_client:freejobs() return 0 end +-- has free jobs? +function distcc_build_client:has_freejobs() + return self:freejobs() > 0 +end + -- run compilation job function distcc_build_client:iorunv(program, argv, opt) @@ -250,7 +255,7 @@ end function distcc_build_client:_get_freehost() local max_weight = -1 local host - if self:_has_freejobs() then + if self:has_freejobs() then for _, host_status in pairs(self:hosts_status()) do if host_status.freejobs > 0 and host_status.weight > max_weight then max_weight = host_status.weight @@ -305,12 +310,6 @@ function distcc_build_client:_host_status_unlock(host_status) self._RUNNING = running end - --- has free jobs? -function distcc_build_client:_has_freejobs() - return self:freejobs() > 0 -end - -- get the session id, only for unique project function distcc_build_client:_session_id(addr, port) local hosts = self:status().hosts |
