mirror of
https://github.com/natnat-mc/moonbuild
synced 2026-05-14 06:51:14 +02:00
actually honor sync requests
This commit is contained in:
@@ -12,6 +12,8 @@ nodepriority = (a, b) ->
|
||||
tb = type b.name
|
||||
da = #a.deps
|
||||
db = #b.deps
|
||||
sa = a.sync
|
||||
sb = b.sync
|
||||
if ta=='string' and tb!='string'
|
||||
return true
|
||||
elseif ta!='string' and tb=='string'
|
||||
@@ -20,6 +22,10 @@ nodepriority = (a, b) ->
|
||||
return true
|
||||
elseif a.priority < b.priority
|
||||
return false
|
||||
elseif sa and not sb
|
||||
return false
|
||||
elseif sb and not sa
|
||||
return true
|
||||
else
|
||||
return da < db
|
||||
|
||||
|
||||
@@ -37,6 +37,14 @@ class Executor
|
||||
error "Node #{name} wasn't built" unless node.built
|
||||
|
||||
addprocess: (node, opts) =>
|
||||
if node.sync
|
||||
while @nprocesses != 0
|
||||
@waitprocess
|
||||
node\build opts
|
||||
node.built = true
|
||||
node\updatecache!
|
||||
return
|
||||
|
||||
pid = fork!
|
||||
error "Failed to fork" unless pid
|
||||
if pid!=0
|
||||
|
||||
Reference in New Issue
Block a user