This commit is contained in:
Neil Alexander 2021-07-02 11:45:52 +01:00
parent 9fe6b01f94
commit eb42429b72
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 0 additions and 14 deletions

View file

@ -311,7 +311,6 @@ func (t *inputWorker) run() {
} }
defer t.running.Store(false) defer t.running.Store(false)
for { for {
<-t.input.wait()
task, ok := t.input.pop() task, ok := t.input.pop()
if !ok { if !ok {
return return

View file

@ -49,16 +49,3 @@ func (q *fifoQueue) pop() (*inputTask, bool) {
} }
return frame, true return frame, true
} }
// wait returns a channel which can be used to detect when an
// item is waiting in the queue.
func (q *fifoQueue) wait() <-chan struct{} {
q.mutex.Lock()
defer q.mutex.Unlock()
if q.count > 0 && len(q.notifs) == 0 {
ch := make(chan struct{})
close(ch)
return ch
}
return q.notifs
}