Converting Event-based Asynchronous Pattern into Task-based Asynchronous Pattern in C++ using PPL

April 23, 2013

In C# we have many ways for writing asynchronous code, we can create our own thread (a bad practice most of the times), we can use the thread-pool, we can use BackgroundWorker or we can use Tasks (and Async\Await which is based on tasks) In order to notify the completion of an asynchronous operation we also have a few options (which depends on the type of dispatch mechanism we used). We can raise event when the work is done, we can call a callback function, or we can use a continuation style like Task.ContinueWith() or the Async\Await pattern...
no comments