Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# 5 await/async pattern in API design

Tags:

c#

How can the c# 5 await/async pattern boost the expressiveness of new APIs that deals with coroutines (as Jon Skeet shows in recent posts), or with the actor model?

like image 716
Masterile Avatar asked Jun 29 '11 23:06

Masterile


1 Answers

As you mentioned, Jon Skeet's has been discussing Coroutines using the Async CTP, so I will skip that portion of your question...

The actor model is actually being addressed in the Async CTP via TPL Dataflow. This is a new library using the Task classes which allows for a form of the Actor model as well as many other data flow and similar scenarios. Since it's based around the Task and Task<T> classes, it also integrates perfectly with await/async very nicely.

like image 81
Reed Copsey Avatar answered Sep 18 '22 11:09

Reed Copsey