mox/store
Mechiel Lukkien e943e0c65d
fix delay with propagating mailbox changes to other imap (idle) connections
when broadcasting a change, we would try to send the changes on a channel,
non-blocking. if we couldn't send (because there was no pending blocked
receive), we would wait until the potential receiver would explicitly request
the changes. however, the imap idle handler would not explicitly request the
changes, but do a receive on the changes channel. since there was no pending
blocked send on the channel, that receive would block. only when another event
would come in, would both the pending and the new changes be sent.

we now use a channel only for signaling there are pending changes. the channel
is buffered, so when broadcasting we can just set the signal by a non-blocking
send and continue with the next listener. the receiver will get the buffered
signal. it can then get the changes directly, but lock-protected.

found when looking at a missing/delayed new message notification in thunderbird
when two messages arrive immediately after each other. this doesn't fix that
problem though: it seems thunderbird just ignores imap untagged "exists"
messages (indicating a new message arrived) during the "uid fetch" command that
it issued after notifications from an "idle" command.
2023-07-23 15:28:37 +02:00
..
account.go fix delay with propagating mailbox changes to other imap (idle) connections 2023-07-23 15:28:37 +02:00
account_test.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
export.go update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations. 2023-05-22 14:40:36 +02:00
export_test.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
import.go implement storing non-system/well-known flags (keywords) for messages and mailboxes, with imap 2023-06-24 00:24:43 +02:00
import_test.go add funtionality to import zip/tgz with maildirs/mboxes to account page 2023-02-16 09:57:27 +01:00
msgreader.go mox! 2023-01-30 14:27:06 +01:00
msgreader_test.go mox! 2023-01-30 14:27:06 +01:00
state.go fix delay with propagating mailbox changes to other imap (idle) connections 2023-07-23 15:28:37 +02:00
tmp.go move "link or copy" functionality to moxio 2023-07-23 12:15:29 +02:00
train.go update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations. 2023-05-22 14:40:36 +02:00
validation.go mox! 2023-01-30 14:27:06 +01:00