About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Asynchronous Read and Write Operations

All the I/O operations explained in the previous sections have been of the synchronous kind, meaning the caller is blocked until the data becomes available. Often, it’s more appropriate to read or write data asynchronously, to prevent hangs of user interface (UI) threads and to increase scalability of services. The essential idea of asynchronous I/O is to start the request and get notified when the action has been completed.

This section examines how the Stream class supports this modus operandi. Even though C# 5.0 introduces a new improved way to deal with asynchronous operations (discussed in great lengths in Chapter 31, “Asynchronous Programming”), we’ll start off by explaining the old Asynchronous Programming ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required