Concur 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Concur --version 1.1.1
                    
NuGet\Install-Package Concur -Version 1.1.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="Concur" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Concur" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Concur" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Concur --version 1.1.1
                    
#r "nuget: Concur, 1.1.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.
#:package Concur@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Concur&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Concur&version=1.1.1
                    
Install as a Cake Tool

Concur

A lightweight C# library providing Go-inspired concurrency patterns for .NET applications.

Features

  • Go-style goroutines for asynchronous execution
  • Channel-based communication between concurrent tasks
  • Simple, intuitive API inspired by Go's concurrency model

Usage

Basic Concurrency

using static ConcurRoutine;

// Run a synchronous action concurrently
Go(() => {
    Console.WriteLine("Running in background");
});

// Run an async function concurrently,
// This allows the async lambda to run independently without blocking
// the calling thread.
Go(async () => {
    await Task.Delay(1000);
    Console.WriteLine("Async work completed");
});

Using Channels

using static ConcurRoutine;

// Create a channel and producer
var numbers = Go<int>(async writer => {
    for (int i = 0; i < 10; i++) {
        await writer.WriteAsync(i);
        await Task.Delay(100);
    }
    
    // the producer is responsible for completing the channel.
    writer.TryComplete();
});

// Consume values
await foreach (var number in numbers.ReadAllAsync()) {
    Console.WriteLine($"Received: {number}");
}

Error Handling

By default, exceptions in concurrent tasks are suppressed and logged only in debug mode. For production environments, you should configure proper error handling:

// Configure with your logging framework
using Microsoft.Extensions.Logging;
using static ConcurRoutine;

// In your application startup
ConcurRoutine.OnException = exception => 
    logger.LogError(exception, "Error in background task");
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • 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.

Version Downloads Last Updated
1.4.0-beta-002 165 7/27/2025
1.4.0-beta-001 255 7/26/2025
1.3.0 96 7/12/2025
1.2.0 128 7/8/2025
1.1.1 125 7/7/2025
1.1.0 129 7/7/2025
1.0.1 130 7/7/2025
1.0.0 133 7/7/2025

Added 'WaitGroup' implementation.