aerc/worker
Reto Brunner 1687e558d3 notmuch/maildir: remove double emit of the dirinfo
There was some bug which could be worked around by double emitting an event.
However that proofed to be brittle:

We send the first message here from the worker goroutine:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

Then Tick() is waked in the main goroutine and calls ProcessMessage:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/widgets/account.go#L100

ProcessMessage in the main goroutine reads types.Message state with
msg.getId() and msg.InResponseTo():
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L74-76

Meanwhile in the worker goroutine we call PostMessage for a second
time with a pointer that points to the *same* previous message that
ProcessMessage is reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/maildir/worker.g=
o#L306

The second PostMessage call makes writes to message while
ProcessMessage in the main goroutine is possibly reading:
https://git.sr.ht/~sircmpwn/aerc/tree/a5553438/item/worker/types/worker.go#=
L59

This led to a data race in the event loop

Reported-By: Wagner Riffel <w@104d.net>
2021-04-28 07:54:16 +02:00
..
handlers Register worker in init. 2019-07-19 15:37:55 -04:00
imap imap: strip <> from message-ids 2020-11-14 15:40:13 +01:00
lib lib/parse: simplify parseAddressList 2021-02-22 11:47:31 +01:00
maildir notmuch/maildir: remove double emit of the dirinfo 2021-04-28 07:54:16 +02:00
notmuch notmuch/maildir: remove double emit of the dirinfo 2021-04-28 07:54:16 +02:00
types Add support for :rmdir 2020-08-19 11:38:57 +02:00
handler_notmuch.go Add notmuch backend 2019-08-08 10:10:34 +09:00
worker.go Register worker in init. 2019-07-19 15:37:55 -04:00
worker_enabled.go Register worker in init. 2019-07-19 15:37:55 -04:00