Runtime: Question: does CLR support for coroutines make sense?

Created on 12 Jan 2020  ·  1Comment  ·  Source: dotnet/runtime

I was very impressed how coroutines where built into C++20 by generalizing the calling conventions1. Is this considered for the CLR? Would it even be worth it?

I assume that features like async/await and yield would greatly benefit from that performance-wise, but the cost to change their implementations would be immense. However, laying the groundwork in the CLR might actually not be that costly...?

I'm just wondering whether this is on someones radar, because, so far, I could only find this comment in a charplang issue asking which CLR changes would benefit C# language features.


1 This summary of the feature (before it got standardized) gives a nice overview.

area-System.Threading.Tasks question tenet-performance

Most helpful comment

As far as I know nobody has done analysis of the estimated benefits and costs of having built-in coroutines support in the runtime. I agree that it would be useful to have such analysis so that we can compare the cost/benefit of doing this with other potential performance-related features.

>All comments

As far as I know nobody has done analysis of the estimated benefits and costs of having built-in coroutines support in the runtime. I agree that it would be useful to have such analysis so that we can compare the cost/benefit of doing this with other potential performance-related features.

Was this page helpful?
0 / 5 - 0 ratings