Glossary Item Box

PowerTCP Mail for .NET

Synchronous vs Asynchronous Methods

The decision of whether to use synchronous or asynchronous methods can be crucial and have an impact on the complexity of your code and the user experience.

The following lists discuss some of the characteristics of synchronous and asynchronous methods in PowerTCP.

Synchronous Methods

Asynchronous Methods

Most applications written with PowerTCP will be synchronous. The reasons for this are not purely due to the ease-of-use of synchronous methods. Synchronous methods are ideal for automated processes that can execute a blocking method for a long period of time. In addition, synchronous methods can work well for interactive applications. The DoEvents property controls the processing of user interface messages while a synchronous method is executing. This means that while a synchronous method is executing, other portions of the application will be able to respond to events (for example, button or menu clicks).

Asynchronous methods, on the other hand, provide a great deal of power. When an asynchronous method is called, the method will execute on a thread separate from the calling thread. Such operation is useful when an action is time consuming and other code needs to execute without waiting for the initial operation to complete. In addition, the user interface will be most responsive when asynchronous methods are used.

 

In This Section

Creating A Project in Visual Studio .NET
This topic discusses creating Projects in Visual Studio .NET.
Placing Components on a Form
This topic demonstrates how to create and use a component using Visual Studio .NET.
Creating Components Dynamically
This topic demonstrates how to add a component dynamically using Visual Studio .NET.
Synchronous vs Asynchronous Methods
This topic discusses the benefits and uses for synchronous and asynchronous methods.
Using Events Within The Visual Studio .NET Environment
Describes how to use PowerTCP events within the Visual Studio .NET environment.
Using Events When The Component Is Created Dynamically
Describes the extra steps required to use events when using a PowerTCP component as a reference.
Using EndXXX Events
Describes how to use the EndXXX events that are raised upon the completion of a method.

 

 


Send comments on this topic.

Documentation version 3.1.

© 2009 Dart Communications.  All rights reserved.