Revert "worker: prevent deadlock by flooding worker.Messages channel"
This reverts commit 7473571159
.
The commit has introduced a regression that lead to the pager not being
filled with content, thereby making reading mails impossible.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
f59ca5af36
commit
ddca71bcfd
1 changed files with 1 additions and 4 deletions
|
@ -64,10 +64,7 @@ func (worker *Worker) PostMessage(msg WorkerMessage,
|
||||||
} else {
|
} else {
|
||||||
logging.Debugf("PostMessage %T", msg)
|
logging.Debugf("PostMessage %T", msg)
|
||||||
}
|
}
|
||||||
// This one needs to be in a separate goroutine to prevent deadlocks
|
|
||||||
go func() {
|
|
||||||
worker.Messages <- msg
|
worker.Messages <- msg
|
||||||
}()
|
|
||||||
|
|
||||||
if cb != nil {
|
if cb != nil {
|
||||||
worker.messageCallbacks[msg.getId()] = cb
|
worker.messageCallbacks[msg.getId()] = cb
|
||||||
|
|
Loading…
Reference in a new issue