Wjybxx.Commons.Concurrent
1.2.1
dotnet add package Wjybxx.Commons.Concurrent --version 1.2.1
NuGet\Install-Package Wjybxx.Commons.Concurrent -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="Wjybxx.Commons.Concurrent" Version="1.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wjybxx.Commons.Concurrent" Version="1.2.1" />
<PackageReference Include="Wjybxx.Commons.Concurrent" />
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 Wjybxx.Commons.Concurrent --version 1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Wjybxx.Commons.Concurrent, 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.
#addin nuget:?package=Wjybxx.Commons.Concurrent&version=1.2.1
#tool nuget:?package=Wjybxx.Commons.Concurrent&version=1.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Concurrent模块
- 提供了Java的Executor和Future框架,并提供了对应的await语法支持。
- 提供了基于Disruptor的高性能EventLoop实现。
- 提供了ValueFutureTask -- 类比系统库的ValueTask。
C#系统并发库缺陷
个人使用C#系统库有几点很难受:
- 系统库的Task其实是Future,这个名字的误导性很强,概念混淆。
- await语法不支持显式传参,回调线程是根据ThreadLocal的【同步上下文】(SyncContext)确定的;await还会隐式捕获【执行上下文】(ExecutionContext);
- await隐式捕获上下文,导致的结果是:简单的问题更加简单,复杂的问题更加复杂。
- Task不支持死锁检测
- TaskCompletionSource泛型类和非泛型类之间是非继承的,我们确实统一的Api获取结果和取消任务。
ReleaseNotes
1.2.1
升级commons.core依赖
1.2.0
C#的异常派发机制和java不同,之前的future异常处理是按照java写的,导致异步任务的异常信息堆栈丢失。
1.1.1 ~ 1.1.2
DisruptorEventLoop
适配Disruptor
模块的等待超时修改。- fix
ValueFuture
的await错误。 - 增加
GlobalEventLoop
和ManualResetPromise
。
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. 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 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. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- Wjybxx.Commons.Core (>= 1.2.1)
- Wjybxx.Disruptor (>= 1.1.1)
-
net6.0
- Wjybxx.Commons.Core (>= 1.2.1)
- Wjybxx.Disruptor (>= 1.1.1)
-
net7.0
- Wjybxx.Commons.Core (>= 1.2.1)
- Wjybxx.Disruptor (>= 1.1.1)
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.2.1 | 106 | 5 months ago | |
1.2.0 | 136 | 7 months ago | |
1.1.2 | 156 | 8 months ago | |
1.1.1 | 169 | 8 months ago | |
1.1.0 | 167 | 8 months ago | |
1.1.0-rc3 | 58 | 9 months ago | |
1.1.0-rc1 | 82 | 9 months ago | |
1.0.15 | 127 | 10 months ago | |
1.0.12 | 138 | 4/11/2024 | |
1.0.11 | 130 | 4/9/2024 | |
1.0.10 | 137 | 4/8/2024 | |
1.0.9 | 139 | 4/3/2024 | |
1.0.8 | 136 | 3/18/2024 |