Nicolas Sebrecht fc079499e9 prevent synchronization of identical folders from multiple threads
Use a mutex to lock the sync transaction, uniquely identified by the remote
folder name.

Serializing the syncs prevents any IDLE thread from syncing the same folder of
a concurrent autorefresh thread. Othewise, we could download new messages
twice, or read "one message past the last one" which in some cases creates a
duplicated messages.  Also prevents IDLE threads from reading new messages
before the autorefresh thread finishes synchronization.

Github-ref: #421
Originally-submitted-by: Michael Hohmuth <hohmuth@sax.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-02-28 19:16:18 +01:00
..
2016-10-20 14:11:51 +02:00
2017-01-27 19:49:42 +01:00
2015-01-07 21:31:43 +01:00
2016-11-02 12:27:00 +01:00
2016-07-28 00:42:35 +02:00
2016-11-08 07:11:33 +01:00