How to Implement IAsyncResult in Boo

In the previous post I gave a very brief introduction to Boo, and some pointers on where to learn more. Hopefully you had some time to look into it a bit since in this post we are diving in. Before we can look at compiler extensibility, we need to have a place to start. Since…


How to convert a Synchronous State Machine to Asynchronous

In my previous post, we looked at a basic state machine implementation for SCTP. In my state machine, the event Abort was implemented with a blocking use of the BeginSend/EndSend. The code is repeated below for you to look at: internal class ActiveState : AssociationState {     public override AssociationState Abort(Association association)     {        …


Asynchronous Operation Model and Code Generation

In the previous post I gave a brief overview of an object model that would allow one to capture the data necessary to implement an asynchronous operation. In this post, I will describe in more detail the concepts of the model. One of the key concepts, the ExceptionModel, consists of a friendly name and possibly…


Model overview for asynchronous programming

In a previous post, I presented some code to implement the IAsyncResult pattern.  In this post, I will present a simplified model representing the concepts needed to implement an asynchronous operation based on the pattern. If designed correctly, the model can be used to automatically generate code that implements most of the pattern.  Because there…


How to implement the IAsyncResult design pattern

In this post, I will be presenting an implementation of the IAsyncResult design pattern that I will revisit in later posts. For my implementation, I would like to start with the implementation found in the March 2007 Concurrent Affairs column on the asynchronous programming model. I  like the Concurrent Affairs implementation mostly because it implements…

3

Exploring Asynchronous Design Patterns

  One programming pattern that could be made easier for the developer is implementing the IAsyncResult asynchronous programming pattern. Writing code so it doesn’t block threads is difficult to do.  It is even more difficult using this pattern because there are multiple different ways for a programmer call an operation implementing the pattern.   Once…