TwistedOak.Util.Lifetime 1.0.0

There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package TwistedOak.Util.Lifetime -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package TwistedOak.Util.Lifetime --version 1.0.0
<PackageReference Include="TwistedOak.Util.Lifetime" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TwistedOak.Util.Lifetime --version 1.0.0
#r "nuget: TwistedOak.Util.Lifetime, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install TwistedOak.Util.Lifetime as a Cake Addin
#addin nuget:?package=TwistedOak.Util.Lifetime&version=1.0.0

// Install TwistedOak.Util.Lifetime as a Cake Tool
#tool nuget:?package=TwistedOak.Util.Lifetime&version=1.0.0

A small library that implements an improved version of System.Threading.CancellationToken with support for removable registrations, to allow for garbage collection in the presence of long-lived tokens, plus some related utilities.

Motivation: cancellation tokens can be the source of memory "leaks", because an unbounded number of completed operations may have registered now-pointless callbacks on a token that can't be released or cancelled. The callbacks may reference all kinds of data, preventing effective garbage collection. Using a Lifetime allows fixing these issues because callback registrations can be given lifetimes of their own.

Additional utilities: LifetimeSource, LifetimeExchanger, DisposableLifetime, Max, Min, CreateDependentSource.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TwistedOak.Util.Lifetime:

Package Downloads
TwistedOak.Collections.PerishableCollection

An observable collection where items are removed when a lifetime paired with them ends. Affords projecting, filtering, and other functional-style usage by removing the need to equate removed items with previously added items.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 1,439 1/8/2013
1.0.1 1,141 12/13/2012
1.0.0 1,171 12/13/2012