DispatchSharp 1.2.1

.NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
dotnet add package DispatchSharp --version 1.2.1
NuGet\Install-Package DispatchSharp -Version 1.2.1
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="DispatchSharp" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DispatchSharp --version 1.2.1
#r "nuget: DispatchSharp, 1.2.1"
#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 DispatchSharp as a Cake Addin
#addin nuget:?package=DispatchSharp&version=1.2.1

// Install DispatchSharp as a Cake Tool
#tool nuget:?package=DispatchSharp&version=1.2.1



A library to make multi-threaded dispatch code more testable.

Models a job dispatch pattern and provides both threaded and non threaded implementations.

Getting Started

Doing a batch of work:

void DoBatch(IEnumerable<object> workToDo) {
	var dispatcher = Dispatch<object>.CreateDefaultMultiThreaded("MyTask");

	dispatcher.WaitForEmptyQueueAndStop();	// only call this if you're not filling the queue from elsewhere


Dispatch<int>.ProcessBatch("BatchRequests", Enumerable.Range(0, times).ToArray(), i => {
        . . .
    ex => {
        Console.WriteLine("Error: " + ex.Message);

Handling long running incoming jobs:

dispatcher = Dispatch<object>.CreateDefaultMultiThreaded("MyService");

Using a polling method to handle incoming jobs in a long-running process:

var dispatcher = Dispatch<object>.PollAndProces("MyService", myPollingSource);

with a method defined like

void MyWorkMethod(object obj)
	. . .
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
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 DispatchSharp:

Package Downloads

A distributed contracts-based sender/handler messaging system built on RabbitMQ and BearBones-Messaging

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 126 6/12/2023
1.4.0 110 5/26/2023
1.3.0 123 5/10/2023
1.2.2 135 4/25/2023
1.2.1 149 4/13/2023
1.2.0 148 4/13/2023
1.1.3 248 2/1/2023
1.1.2 324 11/2/2022
1.1.0 319 11/1/2022
1.0.0 2,219 8/10/2018
0.1.11 2,347 12/6/2013
0.1.10 1,263 8/19/2013
0.1.9 1,505 7/18/2013
0.1.8 1,397 7/9/2013
0.1.7 1,341 6/19/2013
0.1.6 1,325 6/17/2013
0.1.5 1,287 6/10/2013
0.1.4 1,248 6/6/2013
0.1.3 1,268 6/6/2013
0.1.2 1,262 6/4/2013
0.1.1 1,247 6/4/2013
0.1.0 1,315 5/31/2013
0.0.1 1,310 5/21/2013

Expose task names, to support failure tracing for exhaustion issues