Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News Article: Using the Concurrency and Coordination Runtime

Article: Using the Concurrency and Coordination Runtime


Nick Gunn provides a practical introduction using the Concurrency and Coordination Runtime. CCR radically changes the way multi-threaded applications are written in .NET, shifting the focus from threads and locks to lightweight, asynchronous tasks. The Concurrency and Coordination Runtime, also known as CCR, offers actor-style concurrency for .NET applications. Nick describes the CCR as:

The Concurrency and Coordination Runtime (CCR) is an asynchronous message-passing library for the .NET platform that provides a set of small but powerful primitives that enable a different approach to structuring applications. The effective use of the CCR will result in an application that will be more responsive, will scale better and will be more robust. The intriguing aspect about it is that it can deliver these benefits at the same time as reducing (and sometimes removing) the need for you to explicitly deal with threads (and failures on these threads), locks, mutexes and other low-level synchronization primitives.

Nick lives in Sydney where he works for Macquarie Bank, as a senior developer (trading systems). He has previously worked in London for HSBC, Barclays Capital and Credit Suisse. His professional interests include distributed systems and models of computation. He graduated from Manchester University with a degree in Computing and Information Systems. He maintains a technical blog on CCR and related topics at

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Java implementation possible?

    by Srdan Srepfler,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Would it be possible to implement CCR on top of the JVM (having no yield or any other language support needed by the CCR)?

  • There are Scala and Erlang for java

    by Ken Yu,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Not exactly based on java though.

  • Re: Java implementation possible?

    by Jonathan Allen,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I don't see why not. Yield is just a compiler trick, languages like VB.NET can use the CCR by implementing the IEnumerable state machine manually. It's painful, but certainly possible.

  • Does this compile?

    by Miroslav Paskov,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    I was trying the examples and this does not compile:

    new Arbiter< Arbiter < string > >(port, ProcessMessages)

    since Arbiter is static. Am I using a different version or is there anything else?

    Ccr.Core Version: 2.0.913.0

    Well done for the article, I was looking for something like this!

  • coding written

    by Nicko SU,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The article is so cool. I never know about it :)
    IMHO the code that is written in side effect. For example I get code :

    static IEnumerator<ITask> ProcessMessages(Port<string> port)
    bool fDone = false;
    while (!fDone)
    yield return port.Receive(message =>
    if (String.IsNullOrEmpty(message))
    fDone = true;
    For me when you doing some yield, the code should not change other states so it make me confuse

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.