Found 15 packages
A single-threaded async-compatible context.
Provides the fundamental synchronization primitives, including System.Threading.Monitor and System.Threading.Mutex, that are required when writing asynchronous code. Commonly Used Types: System.Threading.Monitor System.Threading.SynchronizationContext System.Threading.ManualResetEvent System.Threading.AutoResetEvent System.Threading.ThreadLocal<T> System.Threading.EventWaitHandle System.Threading.SemaphoreSlim System.Threading.Mutex When using NuGet 3.x this package requires at least version 3.4.
ConfigureAwait(true) and ConfigureAwait(false) are very important when dealing with asynchronous code. However, they make code hard to read and easy to fail. ObviousAwait introduces two aliases: KeepContext() and FreeContext(), reducing the cognitive load while reading and writing asynchronous code.
Run your xunit-based tests on an STA thread with the WPF Dispatcher, a WinForms SynchronizationContext, or even a cross-platform generic UI thread emulation with a SynchronizationContext that keeps code running on a "main thread" for that test. Simply use [WpfFact], [WinFormsFact], [StaFact] or the cross-platform [UIFact] on your test method to run your test under conditions that most closely match the main thread in your application. Theory variants of these attributes allow for parameterized testing. Check out the xunit.combinatorial nuget package for pairwise or combinatorial testing with theories.
A single-threaded async-compatible context.
Provides helpers for SynchronizationContext. Can be used to synchronize UI operations with backend operations.
Integrates with synchronization elements of .NET framework (like ISynchronizeInvoke interface, SynchronizationContext), ensures components that inherit Control get created on UI thread etc.
ReadersWriterLockAsync solves the thread affinity problem for using multiple readers and a single writer lock using async code. It also resumes awaits on the SynchronizationContext where it was started. For example on UI-threads.
Utilities for simulating a SynchronizationContext — useful for testing asynchronous code in controlled threading environments.
ICommand and INotifyPropertyChanged implementations, SynchronizationContext extensions.
An extension to Jeuxjeux20.Mvvm, which provides useful tools to use Application.Dispatcher and SynchronizationContext
Event handlers that marshal the invoke back to the SynchronizationContext on which the registration occurs. This is helpful in data-binding (WPF, UWP, etc) where INotifyPropertyChanged needs posted on the UI thread by a shared library that doesn't have a Dispatcher.
MetaProperties helps you to create event driven architectures in .NET. It saves you time and it helps you avoid mistakes.
A .NET Standard library which provides a base class for background loops. Those loops work on a dedicated thread and provide a SynchronizationContext
IDisposable for handling async stuff safely within non async context