diff options
author | wagner riffel <w@104d.net> | 2022-03-06 10:06:34 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-03-07 10:01:53 +0100 |
commit | 55ae3d2cab8489609a1b11c169c28306730a71ea (patch) | |
tree | 09f3d98987ed93249c4eecd690534f13a961a2d5 /worker/imap | |
parent | c1636f8d757fd73bee841057e1ac0381fded9ce3 (diff) | |
download | aerc-55ae3d2cab8489609a1b11c169c28306730a71ea.tar.gz |
maildir: fix data race in maildir worker
Fix a data race due dirInfo pointer being read in the main goroutine
by NewMessageStore and written in the anonymous goroutine launched in
Worker.getDirectoryInfo.
To address the issue raised in https://todo.sr.ht/~rjarry/aerc/16, we
use readdir(3) once, parse and cache its results, this replaces
go-maildir library Dir.Flags based stat(3) and filepath.Glob
causing the issue when N (emails) is large.
Signed-off-by: wagner riffel <w@104d.net>
Diffstat (limited to 'worker/imap')
0 files changed, 0 insertions, 0 deletions