Async in C# 5.0: Returning Progress During Operation

Async in C# 5.0

[…] you pass asynchronous methods as interface, IProgress<T>, which they (the methods) can call to give an indication of how they’re doing.
[…] The clever feature of Progress<T> is that it will capture the SynchronizationContext on construction, and use it to call your progress update code in the right thread.
[…] Be careful because objects are consumed on different thread […] Use an immutable type to avoid problems.

source: Async in C# 5.0

Technorati tags: C#,ASync

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: