Question

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?)

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top