Renaming busy => active
This commit is contained in:
parent
e11181807f
commit
0150862216
@ -43,7 +43,7 @@ type goldsmith struct {
|
|||||||
stages []*stage
|
stages []*stage
|
||||||
refs map[string]bool
|
refs map[string]bool
|
||||||
mtx sync.Mutex
|
mtx sync.Mutex
|
||||||
busy int64
|
active int64
|
||||||
stalled int64
|
stalled int64
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ func (gs *goldsmith) queueFiles(target uint) {
|
|||||||
|
|
||||||
for path := range files {
|
for path := range files {
|
||||||
for {
|
for {
|
||||||
if gs.busy-gs.stalled >= int64(target) {
|
if gs.active-gs.stalled >= int64(target) {
|
||||||
time.Sleep(time.Millisecond)
|
time.Sleep(time.Millisecond)
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
@ -128,7 +128,7 @@ func (gs *goldsmith) cleanupFiles() {
|
|||||||
func (gs *goldsmith) exportFile(file *File) {
|
func (gs *goldsmith) exportFile(file *File) {
|
||||||
defer func() {
|
defer func() {
|
||||||
file.Buff = *bytes.NewBuffer(nil)
|
file.Buff = *bytes.NewBuffer(nil)
|
||||||
atomic.AddInt64(&gs.busy, -1)
|
atomic.AddInt64(&gs.active, -1)
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if file.Err != nil {
|
if file.Err != nil {
|
||||||
@ -223,7 +223,7 @@ func (gs *goldsmith) chain(s *stage, p Plugin) {
|
|||||||
dispatch(f)
|
dispatch(f)
|
||||||
} else {
|
} else {
|
||||||
f.Buff = *bytes.NewBuffer(nil)
|
f.Buff = *bytes.NewBuffer(nil)
|
||||||
atomic.AddInt64(&gs.busy, -1)
|
atomic.AddInt64(&gs.active, -1)
|
||||||
}
|
}
|
||||||
}(file)
|
}(file)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user