This is another PoC, building recursive code with continuations using the Async CTP. The code creates a fake fiber, which can be suspended and resumed, thus allowing us to “step” through its actions. This technique could be useful when building an interpreting language where you might want to step through the expressions.More
Category Archives: C#
F# style Mailbox / Agent using C# async CTP
More info on TPL DataFlow can be found here : http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d5b3e1f8-c672-48e8-baf8-94f05b431f5c Here is a (naive) F# style Mailbox / Agent using the C# async CTP : This way, we can spawn thousands of agents w/o allocating threads for each of them. The message loop is executed on the threadpool for each iteration and then suspended…More
Async CTP first impressions
This is just my first observations. nothing fancy.. I’ve just installed the new Async CTP (for C# 5 async features) The SP1 Refresh can be found here: http://msdn.microsoft.com/sv-se/vstudio/async/ The new async and await features makes async programming so much sweeter, it lets you write async code in a sequential manner. e.g. This code looks sequential, but the code will…More
O/R Mapping and domain query optimizations
One of the cons of O/R mapping is that the abstraction is a bit too high. You write object-oriented code and often forget about eventual performance problems. Take this (somewhat naive) example: For a given customer, we iterate over all the orders and all the details in those orders and calculate the sum of quantity multiplied…More
UoW / NWorkspace with Linq support
I have blogged about this for quite a while now. Now I’ve finally cleaned up the code and published it at github:https://github.com/rogeralsing/Precio.Infrastructure This is a small framework for UoW/Workspace support in .NET with Linq support. The framework contains a Unit of Work implementation and providers for Entity Framework 4, NHibernate and MongoDB(using NoRM). There is…More
