diff options
author | Robin Jarry <robin@jarry.cc> | 2023-01-02 17:52:58 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-01-03 16:50:07 +0100 |
commit | ddfa5cac1fe9ce602b7b8b5624122cc46f83d62a (patch) | |
tree | a37ed198b43ea89bca9c2cfc35423294a1646826 /lib/structure_helpers_test.go | |
parent | fdb4b272133febba2a5de653eaf256c1f7d61d51 (diff) | |
download | aerc-ddfa5cac1fe9ce602b7b8b5624122cc46f83d62a.tar.gz |
msgstore: fix deadlock in thread builder
When scrolling while the thread builder is running, aerc freezes. This
issue can be easily reproduced by keeping the down arrow pressed while
a folder is loading with local threading enabled.
This is caused by the threadCallback function calling store.Select which
acquires threadsMutex. However, threadCallback is already called with
threadsMutex acquired, causing a deadlock.
Fix the issue by adding a new selectPriv function that does not acquire
the lock and call this one in threadCallback *and* store.Select. Do not
reset threadCallback to nil as it was before.
Fixes: 6b8e0b19d35a ("split: refactor to prevent stuck splits")
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Thomas Vigouroux <me@vigoux.giize.com>
Diffstat (limited to 'lib/structure_helpers_test.go')
0 files changed, 0 insertions, 0 deletions