Tags: CenterEdge/CenterEdge.Async
Tags
Provide visibility to running synchronously (#16) Motivation ---------- There are cases in complex systems where it is helpful for code to know that it is running within a call to AsyncHelper.RunSync. Furthermore, retrieving the previously replaced synchronization context can also be helpful. For example, a call to Form.ShowDialog in a WinForms app may want to reinstall the WindowsFormsSynchronizationContext since a new message pump will be running to process continuations. Modifications ------------- - Add IsRunningSynchronously property - Add GetReplacedSynchronizationContext method - Track the fact we're in the call to RunSync and processing work on its calling thread using a thread static
Add optional state parameters to AsyncHelper (PHNX-12680) (#4) Motivation ---------- In some scenarios this can reduce heap allocations of closures. Modifications ------------- Add the optional state parameter and matching unit tests. Drop .NET 5 target since it is EOL and target .NET 6. https://centeredge.atlassian.net/browse/PHNX-12680
Ensure continuations run with sync task completion (ARCH-98) (#2) Motivation ---------- There is currently a corner case when continuations are queued by a synchronously completing task where those continuations are never executed. Modifications ------------- When the task completes synchronously queue all remaining continuations on the parent synchronization context. Switch build/tests to .NET 6 and language to C# 10. https://centeredge.atlassian.net/browse/ARCH-98