The Wire · Showcase
RUNTIME OPTIMIZES ASYNC CONTEXT RESTORATION, ROSLYN ADDS FULL SEMANTIC TOKEN SUPPORT
By RepoJournal · Filed · About .NET
The runtime is eliminating expensive TLS lookups in async context restoration while Roslyn extends LSP compatibility across the board.
The runtime team shipped a significant optimization that avoids TLS access when restoring async contexts in synchronous cases by caching the Thread object at capture time [1]. This change trades a minor NativeAOT size regression for the foundation to optimize Thread accesses downstream, a worthwhile bet on future performance gains. In parallel, the team restored a critical Frame-walk fallback in Thread.GetContext that was accidentally removed, ensuring backward compatibility for data targets that don't implement GetThreadContext [2]. Roslyn shipped full semantic tokens support to Razor, eliminating the artificial constraint that forced LSP clients into range-only mode [4]. This is a low-cost compatibility win that broadens tool support. Documentation got tightened around NGEN behavior for delay-signed and public-signed assemblies [3], clarifying a historically muddy corner of the signing pipeline. The Roslyn team also cleaned up unused initialization helpers and unnecessary usings across the Razor workspace [5], reducing surface area and cognitive load.
Action items
- → Review Thread.GetContext fallback behavior if you're running custom data targets dotnet/runtime [plan]
- → Update LSP client compatibility checks - full semantic tokens now available in Razor dotnet/roslyn [monitor]
- → Test async context restoration performance in your production workloads after consuming the optimization dotnet/runtime [plan]
References
- [1] JIT: Avoid TLS access when restoring async contexts ↗ dotnet/runtime
- [2] [cDAC] Restore Frame-walk fallback in Thread.GetContext (#128518) dotnet/runtime
- [3] Update public-signing.md with NGEN details ↗ dotnet/runtime
- [4] Add full semantic tokens support to Razor ↗ dotnet/roslyn
- [5] Minor cleanups in Razor Workspaces ↗ dotnet/roslyn
FAQ
- What changed in .NET on May 25, 2026?
- The runtime is eliminating expensive TLS lookups in async context restoration while Roslyn extends LSP compatibility across the board.
- What should .NET teams do about it?
- Review Thread.GetContext fallback behavior if you're running custom data targets • Update LSP client compatibility checks - full semantic tokens now available in Razor • Test async context restoration performance in your production workloads after consuming the optimization
- Which .NET repositories shipped on May 25, 2026?
- dotnet/runtime, dotnet/roslyn