Type | Description |
Synchronized with
Protocol API commands, for example,
|
|
Methods that set options, for example,
| |
---|
processResponses
. For example, a thread that uses the IMAP4 module can invoke a call to processResponses
to download a message while another thread is executing API commands.
A multithreaded application may need to provide a lock on the SDK in order to synchronize state-sensitive sequences of commands within the SMTP, POP3, and IMAP4 modules as well. For example, if two threads that are connected to the same SMTP server are used to send mail, a lock is needed to prevent both threads from sending mail at the same time. If the SMTPClient.rcptTo
methods of the two threads are interleaved, the email may be sent to the wrong destination.
[Top]MIMEMessage
or other MIME objects, such as MIMEMultiPart
, concurrently.
One situation that is applicable to MIME in a multithreaded environment is the simultaneous parsing of multiple messages by different threads. To do this, multiple threads can create their own instances of the MIMEParser
(or MIMEDynamicParser
) object or share the same MIMEParser
(or MIMEDynamicParser
) instance.
When multiple threads share the parser object, the client application must serialize access to the object. Different MIMEDynamicParser
objects can share a single instance of the MIMEDataSink
object, however.
[Top]
Last Updated: June 3, 1998
For the latest technical information on Sun-Netscape Alliance products, go to: http://developer.iplanet.com
For more Internet development resources, try Netscape TechSearch.