mozilla-b2g/gaia-email-libs-and-more — pull request #49 by asutherland (2012-09-26 05:57:12+00:00)
Title: IMAP resiliency improvements

Although this is from my move branch, apart from speculative comments, this work is all to improve IMAP resiliency and offer affordances that ActiveSync could also use. I would like to land this because all tests are green and some of the work is a necessary predecessor of the actual move implementation. Also, this patch now means less review later!

Key bits:
- retry logic and improved connection management
- mutexed operation for folders; there are comments that explain why deadlocks currently can't happen under existing coding idioms. The mutexes are opt-in, so ActiveSync is and can be ignorant of these.

All tests are green with these changes, and manually running with IMAP and ActiveSync seems to work okay.

r? @mozsquib