tags:

views:

375

answers:

2

I've been trying to get my head around the CCR (Concurrency And Coordination Runtime) to see if it is worth learning.

I program mostly in Vb.net and in most of the examples of using the CCR use the Yield keyword.

How essential is Yield for using the CCR? Are there workarounds? Will VB.net Get the Yield command? (If Not WHY NOT?)

+1  A: 

Yes, iterator blocks (as signified by yield statements) are pretty crucial to the CCR from what I understand. They're what make readable asynchronous workflows possible.

Have you already looked at Parallel Extensions? If not, I'd try that before the CCR - aside from anything else, it's more likely to be VB.NET friendly and it'll be in the "main" .NET 4.0 when that comes out.

Jon Skeet
I think the CCR Offers a entirely different approach to concurrency. What has impressed me the most has been the scalability of the approach. Maybe time to learn more C#
Harry
i'm not particular interested in running concurrent operations. but take advantage of sequential looking asynchronous code.
Harry
Blog post on this very topic from the Parallel Extensions team: http://blogs.msdn.com/pfxteam/archive/2009/06/30/9809774.aspx
Daniel Earwicker
+1  A: 

The yield keyword is not essential, but it makes things hugely easier when using the CCR. It is required to spawn tasks in a handler method, which can be done by simply using primitives, but not nearly so elegantly. I've never seen any CCR code written in VB.NET, but I suppose there are workarounds to return an IEnumerable object (though I cannot confirm this, as it is has been a long time since I've written any VB.NET). Last time I heard, there was a fair possibility that VB.NET 10 will be getting an equivalent of the yield keyword.

Noldorin