Schedule 1.0.8-prerelease

This is a prerelease version of Schedule.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Schedule --version 1.0.8-prerelease                
NuGet\Install-Package Schedule -Version 1.0.8-prerelease                
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.
<PackageReference Include="Schedule" Version="1.0.8-prerelease" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Schedule --version 1.0.8-prerelease                
#r "nuget: Schedule, 1.0.8-prerelease"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Schedule as a Cake Addin
#addin nuget:?package=Schedule&version=1.0.8-prerelease&prerelease

// Install Schedule as a Cake Tool
#tool nuget:?package=Schedule&version=1.0.8-prerelease&prerelease                

Schedule

Schedulers for asynchronous execution in a separate thread.

Features

  • Non-blocking execution
  • Non-competing thread-safe execution in a single or multiple threads
  • Circular buffer of tasks implementing LRU or MRU cache
  • Thread-safe single-threaded timer
  • Batch execution with delay

Status

Install-Package Schedule

GitHub Workflow Status (with event) GitHub GitHub

Sample


// Guaranteed execution in a single thread for thread-safe access to context variables

var scheduler = new BackgroundRunner();
var x = scheduler.Send(() => Environment.CurrentManagedThreadId).Task.Result;
var y = Task.Run(() => scheduler.Send(() => Environment.CurrentManagedThreadId).Task.Result).Result;

Assert.Equal(x, y);

// Thread-safe single-threaded timer 

var num = new Random();
var collection = new List<int>();
var scheduler = new LoopScheduler();

Observable.Interval(span, scheduler).Subscribe(o => collection.Add(num.Next()));

Roadmap

Automatically calculate CPU load and spread work across cores.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Schedule:

Package Downloads
Terminal.Core

Internal package for trading and analysis

ServiceScheduler

HTTP service with streaming and parallel execution.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.5 96 2/21/2024
1.1.4 87 2/19/2024
1.1.3 757 5/28/2023
1.1.2 298 5/14/2023
1.1.1-prerelease 220 3/5/2023
1.1.0-prerelease 88 3/5/2023
1.0.9-prerelease 199 2/24/2023
1.0.8-prerelease 129 2/21/2023
1.0.7-prerelease 169 2/20/2023
1.0.5-prerelease 160 2/14/2023
1.0.1-prerelease 94 2/13/2023
1.0.0-prerelease 571 11/6/2022