高性能的多线程异步工具库。A collection of tools that support asynchronous methods and support high-performance multithreading.
| Build | NuGet |
|---|---|
A collection of tools that support asynchronous methods and support high-performance multithreading.
Two different libraries are provided for installation.
.NET CLI:
dotnet add package dotnetCampus.AsyncWorkerCollectionPackageReference:
.NET CLI:
dotnet add package dotnetCampus.AsyncWorkerCollection.Source --version 1.2.1PackageReference:
all
runtime; build; native; contentfiles; analyzers
An asynchronous queue that supports multiple threads
Create a queue:
var asyncQueue = new AsyncQueue();Add task to queue:
asyncQueue.Enqueue(new FooTask());Waiting for the task to dequeue:
var fooTask = await asyncQueue.DequeueAsync();The advantage of AsyncQueue over Channel is that it supports .NET Framework 45 and simple
DoubleBufferTask supports multi-threaded fast input data and single-threaded batch processing of data, and supports waiting for buffer execution to complete
…Asynchronous version of AutoResetEvent lock
AsyncAutoResetEvent is functionally the same as AutoResetEvent, except that WaitOne is replaced with WaitOneAsync to support asynchronous waiting
Asynchronous version of ManualResetEvent lock
AsyncManualResetEvent is functionally the same as ManualResetEvent, except that WaitOne is replaced with WaitOneAsync to support asynchronous waiting
See Benchmark.md
If you would like to contribute, feel free to create a Pull Request, or give us Bug Report.
No open issues yet, or sync has not completed.