开源AwaitableCompletionSource,用于取代TaskCompletionSource (2)

注:AwaitableCompletionSource单例,TaskCompletionSource瞬态。

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
TaskCompletionSource_WithTimeout   233.1 ns   4.59 ns   6.58 ns   0.1357   -   -   568 B  
AwaitableCompletionSource_WithTimeout   131.5 ns   1.41 ns   1.32 ns   -   -   -   -  
4 总结

AwaitableCompletionSource在多个场景下可替代TaskCompletionSource,项目我已开源在https://github.com/xljiulang/AwaitableCompletionSource

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wppgxf.html