aerc/worker/types
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
..
messages.go imap: stop checkmail if there are pending actions 2022-09-29 17:14:07 +02:00
sort.go Add sorting functionality 2019-09-20 14:56:02 -04:00
thread.go logging: substitute %w for %v 2022-10-02 18:56:26 +02:00
thread_test.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
worker.go worker: use container/list as job queue 2022-10-04 09:18:30 +02:00