CCR, Yield and VB.net
Asked Answered
H

2

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

Hilburn answered 26/1, 2009 at 22:53 Comment(0)
C
1

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.

Crushing answered 26/1, 2009 at 22:56 Comment(3)
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#Hilburn
i'm not particular interested in running concurrent operations. but take advantage of sequential looking asynchronous code.Hilburn
Blog post on this very topic from the Parallel Extensions team: blogs.msdn.com/pfxteam/archive/2009/06/30/9809774.aspxNaresh
F
1

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.

Friend answered 26/1, 2009 at 23:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.