mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
e943e0c65d
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. |
||
---|---|---|
.. | ||
append_test.go | ||
authenticate_test.go | ||
copy_test.go | ||
create_test.go | ||
delete_test.go | ||
error.go | ||
expunge_test.go | ||
fetch.go | ||
fetch_test.go | ||
fuzz_test.go | ||
idle_test.go | ||
list.go | ||
list_test.go | ||
lsub_test.go | ||
move_test.go | ||
pack.go | ||
parse.go | ||
prefixconn.go | ||
protocol.go | ||
protocol_test.go | ||
rename_test.go | ||
search.go | ||
search_test.go | ||
selectexamine_test.go | ||
server.go | ||
server_test.go | ||
starttls_test.go | ||
status_test.go | ||
store_test.go | ||
subscribe_test.go | ||
unselect_test.go | ||
unsubscribe_test.go | ||
utf7.go | ||
utf7_test.go |