aerc/worker
Tim Culverhouse 4c371170c5 worker: use container/list as job queue
The worker uses a buffered channel to queue tasks. Buffered channels
are effective at FIFO, but are prone to blocking. The design of aerc is
such that the UI must always accept a response from the backends, and
the backends must always accept a request from the UI. By using buffered
channels for both of these communication channels, a deadlock will
occur.

Break the chain by using a doubly linked list (container/list from the
standard library) to queue tasks for the worker. Essentially, this is an
infinitely buffered channel - but more memory efficient as it can change
size dynamically.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-10-04 09:18:30 +02:00
..
handlers go.mod: change base git url 2021-11-05 10:21:45 +01:00
imap imap,smtp: add XOAUTH2 support 2022-10-01 15:47:33 +02:00
lib lib: parse address header fields to utf-8 2022-09-29 16:51:53 +02:00
maildir maildir: hide invalid folders 2022-10-03 21:07:59 +02:00
mbox logging: substitute %w for %v 2022-10-02 18:56:26 +02:00
notmuch logging: substitute %w for %v 2022-10-02 18:56:26 +02:00
types worker: use container/list as job queue 2022-10-04 09:18:30 +02:00
handler_notmuch.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
worker.go logging: use level-based logger functions 2022-07-23 22:52:15 +02:00
worker_enabled.go mbox: implement an mbox backend worker 2022-07-14 23:14:45 +02:00