Catalyst Internet Mail .NET

InternetMail.ThreadingModel Enumeration

Specifies the threading model used by the class instance.

[Visual Basic]
Public Enum InternetMail.ThreadingModel
[C#]
public enum InternetMail.ThreadingModel

Remarks

The threading model modelSingleThread does not limit the application to a single thread of execution. It specifies that only a single thread may invoke methods in a class instance. When a session is established using the Connect method, that session is attached to the thread that created it. From that point on, until the session is terminated, only the owner may invoke methods in that instance of the class. The ownership of the class instance may be transferred from one thread to another using the AttachThread method.

The threading model modelFreeThread disables certain internal safety checks that are performed by the class and may result in unexpected behavior unless you ensure that access to the class instance is synchronized across multiple threads. The application must ensure that no two threads will attempt to invoke a blocking method at the same time. In other words, if one thread invokes a method, the application must ensure that another thread will not attempt to invoke any other method at the same time using the same instance of the class.

Members

Member Name Description
modelSingleThread Methods in the class instance may only be invoked by a single thread. This threading model specifies that only the thread which established the connection should be permitted to invoke methods. This is the default threading model.
modelFreeThread Methods in the class instance may be invoked by any thread. This threading model permits methods to be invoked across multiple threads without being explicitly attached to the object.

Requirements

Namespace: SocketTools

Assembly: SocketTools.InternetMail (in SocketTools.InternetMail.dll)

See Also

SocketTools Namespace