aboutsummaryrefslogtreecommitdiffstats
path: root/commands/new-account.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-09-27 22:43:53 -0500
committerRobin Jarry <robin@jarry.cc>2022-10-04 09:18:30 +0200
commit4c371170c57d39399a924bd4d27d67226a9a7f39 (patch)
tree8b08b9cfc1b8406656d005d2761ae56df961a130 /commands/new-account.go
parent1c2dd4c9f15ddc9cba0849c4077525bd6d64cd6a (diff)
downloadaerc-4c371170c57d39399a924bd4d27d67226a9a7f39.tar.gz
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>
Diffstat (limited to 'commands/new-account.go')
0 files changed, 0 insertions, 0 deletions