Disruptor-net (Concurrent Programming Framework) for .NET Framework
With the recent release of the LMAX Disruptor framework, it was clear somebody was going to port the pattern to .NET. I started a port during my daily commute but have clearly been beaten by others. Obvious question/thought is whether Microsoft and specifically the TPL Dataflow team will include a disruptor like pattern in future releases of the framework given that TPL Dataflow deals with messages etc and would have to solve similar problems to what the disruptor attempts to solve.
Anyway, back to my port of Disruptor. I suspect I’ll continue a bit with the code, but will shortly dump the codebase given the disruptor-net initiative.
Notes on the code I have ported:
- Java … maps to C# params
- Nested class access is slight different between Java and C#
- Not sure how p1..p14 work in C# compared to Java
- enum newInstance() method in Java mapped to an extension method in C# for my port
- volatile long isn’t available using the volatile keyword in C#