Open
Description
Intro
This issue tracks progress on implementing so-called "runtime-async", meaning implementation for async methods directly inside the .NET runtime. This is in contrast to the current support which is implemented only in language compilers, like C#, VB, and F#.
Draft specification: https://github.com/dotnet/runtime/blob/main/docs/design/specs/runtime-async.md
Design issues to be resolved:
- Are we going to use an attribute of a
MethodImpl
flag to identify async methods?
(Re comment:Add draft of runtime async ECMA-335 changes #104063 (comment))- Resolved: Yes.
- What are restrictions and guarantees for runtime async methods in structs.
- Resolved: By-refs are not preserved across Awaits, so the compiler is responsible for making sure that struct instance methods don't occur across Await
- What, if any, are the stack requirements on calling a method with the async calling convention inside an async method?
- Resolved: The stated return type of an async method is the Task-like type. The stack should instead hold the type argument type (or nothing).
- What do we do for async delegates in general and
Func<T>
in particular?- The helpers will work fine, but the call may be slower than not going through delegates.
- What do we do for function pointers to async methods?
- What to do with Event and Property accessors. Presumably they cannot be async, so what happens if return Task and Async marker is applied?
- Resolved: No special restriction at the runtime level.
Work
- Merge runtime into runtime-labs for integration
- Merge from runtime-labs into runtime
- Bring up testing in dotnet/runtime
- Bring over Roslyn package for testing
- [RuntimeAsync] PGO support. #115096
- [RuntimeAsync] R2R support #115098
- [RuntimeAsync] Reflection/introspection support #115099
- [RuntimeAsync] Multicore JIT support. #115097
- [RuntimeAsync] Dynamic methods (System.Reflection.Emit). #115101
- [RuntimeAsync] Implement new byref local zeroing #115262
- [RuntimeAsync] Implement ilasm/ildasm support for the MethodImpl.Async #115093
- [RuntimeAsync] Avoid keeping continuation state alive after resumption #115263
- [RuntimeAsync] Disallow introduction of captured byrefs in strength reduction #115260
- [RuntimeAsync] Implement suspension-aware liveness and dead-code elimination #115261
- [RuntimeAsync] Remove JitOptimizeAwait knob (or make checked), eventually. #115264
- [RuntimeAsync] Revisit TODOs in places of questionable intersections of existing scenarios and Async #115094
- [RuntimeAsync] Double check OSR in async2 struct instance methods #115259
- [RuntimeAsync] Reflection complains about ambiguity when querying async2 methods #115258
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Status
UserStories + Epics