diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-09-29 19:47:07 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-09-29 19:47:07 -0700 |
commit | 905b2415dae343af598d6f038e267d7f3af806f8 (patch) | |
tree | e929f517091355c6372f60e0139c28fbe5163220 /src/async/imap/MCIMAPOperation.cc | |
parent | b3a1739618d12cceedd05e6eac81e1765d9e4223 (diff) |
Callback is now called on the dispatch queue where the operation has been instanciated on Apple platforms
Diffstat (limited to 'src/async/imap/MCIMAPOperation.cc')
-rw-r--r-- | src/async/imap/MCIMAPOperation.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/async/imap/MCIMAPOperation.cc b/src/async/imap/MCIMAPOperation.cc index 1211a73b..99e4d6e0 100644 --- a/src/async/imap/MCIMAPOperation.cc +++ b/src/async/imap/MCIMAPOperation.cc @@ -9,6 +9,9 @@ #include "MCIMAPOperation.h" #include <stdlib.h> +#if __APPLE__ +#include <dispatch/dispatch.h> +#endif #include "MCIMAPAsyncSession.h" #include "MCIMAPSession.h" @@ -90,7 +93,7 @@ void IMAPOperation::bodyProgress(IMAPSession * session, unsigned int current, un context->current = current; context->maximum = maximum; retain(); - performMethodOnMainThread((Object::Method) &IMAPOperation::bodyProgressOnMainThread, context); + performMethodOnMainThread((Object::Method) &IMAPOperation::bodyProgressOnMainThread, context, true); } void IMAPOperation::bodyProgressOnMainThread(void * ctx) @@ -117,7 +120,7 @@ void IMAPOperation::itemsProgress(IMAPSession * session, unsigned int current, u context->current = current; context->maximum = maximum; retain(); - performMethodOnMainThread((Object::Method) &IMAPOperation::itemsProgressOnMainThread, context); + performMethodOnMainThread((Object::Method) &IMAPOperation::itemsProgressOnMainThread, context, true); } void IMAPOperation::itemsProgressOnMainThread(void * ctx) |