Ascentis.AsyncDisposer
1.2.5
dotnet add package Ascentis.AsyncDisposer --version 1.2.5
NuGet\Install-Package Ascentis.AsyncDisposer -Version 1.2.5
<PackageReference Include="Ascentis.AsyncDisposer" Version="1.2.5" />
paket add Ascentis.AsyncDisposer --version 1.2.5
#r "nuget: Ascentis.AsyncDisposer, 1.2.5"
// Install Ascentis.AsyncDisposer as a Cake Addin #addin nuget:?package=Ascentis.AsyncDisposer&version=1.2.5 // Install Ascentis.AsyncDisposer as a Cake Tool #tool nuget:?package=Ascentis.AsyncDisposer&version=1.2.5
Ascentis.AsyncDisposer Component
Use this static class to dispose of IDisposable objects using async semantics. When to use this? If you use third party software which you can't modify that has caused you trouble when disposing objects on an event which later makes software beyond your control throw exceptions because somewhere in the call stack it tries to use the diposed object. With this class you can enqueue the IDisposable instance in the AsyncDisposer queue and it will be guaranteed to stay in queue for a specified global period of time before being take for disposal. Tune the timing in a way that gives time enough for the calling procedure in the stack to complete and return to the caller.
A second class part of this package is ConcurrentObjectAccessor<>. This class allows to wrap an object within it and allow for protected access to execute functions within a readlock. This allows usage of method SwapAndExecute() which allow to swap safely the underlying reference wrapped. When to use this? When dealing with COM, COM+ or DCOM objects prone to crashing or suffering from network partitions. With this class the COM object can be isolated behing a wrapper relying on ConcurrentObjectAccessor and the low level object can be replaced transparently upon detection of partition exception.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Improve type management of return types using generic types