Closed maksimkim closed 3 years ago
I like this PR: Azure/DotNetty#375,I didn't notice that before.:sweat_smile:
There is no performance benefit associated with using IPromise......
Netty's thread pool determines that IPromise cannot be completely removed, especially Codes.Http2 is a bit complicated for the use of IPromise.
To be honest, I like Orleans scheduler for single-threaded processing, it's friendly to developers
PS. My English is not good.:sleeping:
Codes.Http2 is developed based on your http2 branch,Thanks!:raised_hands:
@cuteant will you consider accepting PR to SpanNetty to replace IPromise with ValueTask if I create one?
By the way, DotNetty also provides single threaded execution semantic with System.Threading.Task through custom TaskScheduler.
@maksimkim ,:clap::clap::clap:All right!
I wonder what was the reason to change channel api write methods from Task to IPromise? If it's to have less allocations ValueTask seems better alternative given it's part of CLR today and can simplify usage with await. And it even allow to avoid allocations in most cases: https://tooslowexception.com/implementing-custom-ivaluetasksource-async-without-allocations/ I actually opened corresponding PR in original repo: https://github.com/Azure/DotNetty/pull/375 Are there any benefits of IPromise?