SmtpJobsSyncRoot Property |
Namespace: MailBee.SmtpMail
Synchronization of the access to the jobs collections is required if the jobs are currently being processed and the application wishes to modify or enumerate any of the jobs collections on another thread using corresponding methods of SendMailJobCollection class. Synchronization is NOT required in single-thread mode (MaxThreadCount is 1 and no asynchronous methods used) or if the component has already finished processing jobs (IsBusy is false). Synchronization, however, may be required even if MaxThreadCount is 1 but the application uses worker threads or runs jobs in asynchronous mode (with BeginSendJobs(AsyncCallback, Object) method).
Note |
---|
Smtp class methods which can modify jobs collections (AddJob(String, String, EmailAddressCollection), RetryFailedJobs, SendJobs, etc) take care of synchronization automatically. The developer may need to use JobsSyncRoot only when accessing job collections directly. |