diff options
author | 2014-01-18 20:29:02 -0800 | |
---|---|---|
committer | 2014-01-18 20:29:02 -0800 | |
commit | 19019c91102037413b763381a907ba5fbb3a350b (patch) | |
tree | a9c22a515542f58604daffd98083943c09044ff8 /src/objc/smtp | |
parent | 5b151becd1f950254ab9b7a5effd66210792247a (diff) |
Fixed #567: dispatch queue for POP and SMTP
Diffstat (limited to 'src/objc/smtp')
-rw-r--r-- | src/objc/smtp/MCOSMTPSession.h | 6 | ||||
-rw-r--r-- | src/objc/smtp/MCOSMTPSession.mm | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/objc/smtp/MCOSMTPSession.h b/src/objc/smtp/MCOSMTPSession.h index 90351551..09116508 100644 --- a/src/objc/smtp/MCOSMTPSession.h +++ b/src/objc/smtp/MCOSMTPSession.h @@ -76,6 +76,12 @@ */ @property (nonatomic, copy) MCOConnectionLogger connectionLogger; +/** This property provides some hints to MCOSMTPSession about where it's called from. + It will make MCOSMTPSession safe. It will also set all the callbacks of operations to run on this given queue. + Defaults to the main queue. + This property should be used only if there's performance issue using MCOSMTPSession in the main thread. */ +@property (nonatomic, assign) dispatch_queue_t dispatchQueue; + /** @name Operations */ /** diff --git a/src/objc/smtp/MCOSMTPSession.mm b/src/objc/smtp/MCOSMTPSession.mm index 29211118..b6ae6a4f 100644 --- a/src/objc/smtp/MCOSMTPSession.mm +++ b/src/objc/smtp/MCOSMTPSession.mm @@ -81,6 +81,7 @@ MCO_OBJC_SYNTHESIZE_SCALAR(MCOConnectionType, mailcore::ConnectionType, setConne MCO_OBJC_SYNTHESIZE_SCALAR(NSTimeInterval, time_t, setTimeout, timeout) MCO_OBJC_SYNTHESIZE_BOOL(setCheckCertificateEnabled, isCheckCertificateEnabled) MCO_OBJC_SYNTHESIZE_BOOL(setUseHeloIPEnabled, useHeloIPEnabled) +MCO_OBJC_SYNTHESIZE_SCALAR(dispatch_queue_t, dispatch_queue_t, setDispatchQueue, dispatchQueue); - (void) setConnectionLogger:(MCOConnectionLogger)connectionLogger { |