Search code examples
c#.net-4.0stacklesspython-stackless

Is there something similar to Stackless Python available in C#?


Is there something similar to Stackless Python, i.e. a framework that supports continuations, microthreads and lightweight processes in C#? I know that C# 5 is going to support partially some of these features. But is there anything that can be used right now?


Solution

  • Axum is similar, but has been officially dropped as a project from Microsoft:

    http://msdn.microsoft.com/en-us/devlabs/dd795202

    I've got a blog post showing a basic co-routine at work:

    http://adamhouldsworth.blogspot.com/2009/05/microsoft-axum-playtime.html

    I have no idea if any of those ideas have been pushed across to the parallel work that went into .NET 4 or the async stuff slated for C# next.

    It can be used right now, and works - but is feature incomplete in some small areas and not supported in a production environment as it's (was?) an incubation project.

    Take a look at this on CodeProject (it may address your "lightweight process" requirement):

    http://www.codeproject.com/KB/cs/managediocp.aspx

    Update: this link describes TPL Data Flow, more primitives added to the .NET framework in order to support agent-based programming. It again might be in the area you are interested in:

    http://blogs.msdn.com/b/pfxteam/archive/2010/10/28/10081950.aspx