basically copy the files to a temp dir before copying them to the destination. Also update the doctext to reflect that we do not nest read locks on both mailboxes.
Also only the write operations to the dest folder lock a mailbox for write, so batch that in batches of 10 messages at a time so other parts of the system can still access the destination mailbox. Previously if we were, say, deleting 1,000 messages we would lock the destination mailbox for write until all 1,000 messages were added to it. This should be a bit nicer.
basically copy the files to a temp dir before copying them to the destination. Also update the doctext to reflect that we do not nest read locks on both mailboxes.
Also only the write operations to the dest folder lock a mailbox for write, so batch that in batches of 10 messages at a time so other parts of the system can still access the destination mailbox. Previously if we were, say, deleting 1,000 messages we would lock the destination mailbox for write until all 1,000 messages were added to it. This should be a bit nicer.
Fixes GH-245