Unix: add mode to inline Socket continuations#37974
Unix: add mode to inline Socket continuations#37974stephentoub merged 9 commits intodotnet:masterfrom
Conversation
On Unix, socket continuations are dispatched to the ThreadPool from an event thread. This avoids continuations blocking the event handling. This adds an option to disable that dispatch. Continuations for socket operations will be executed on the event thread directly. This removes the overhead of context switching to the ThreadPool. Currently this is implemented as an application level switch for benchmarking, and experimentation. It may be made controllable at the Socket level. To avoid the event threads being a bottleneck, ProcessorCount event threads are created.
|
Tagging subscribers to this area: @dotnet/ncl |
|
This is a new PR for changes in #34945. |
|
A bunch of test runs are still reported as "Skipped". I wonder if I missed an existing discussion on these CI issues? If not I can try to start one, this is not the only PR being blocked. |
A bunch of tests are supposed to be skipped ;-) Which ones are you referring to? |
|
Seems there was something wrong with the previous PR. This one went through. Thanks, @tmds. |
|
@stephentoub sorry, I meant AZP jobs not individual tests. One thing I missed is that all of them are "checked" or mono builds, so it's likely fine, however quite confusing. |
|
@tmds I happened to be looking at this code and I'm confused by something. You added the |
When a socket event occurs, the pending operations gets triggered to continue their work by calling the Process method. The changes in dotnet#37974 cause Process to be called twice on the same AsyncOperation. When Process is called, the operation can complete, and the AsyncOperation instance may be reused for a different operation.
…5683) * SocketAsyncContext.Unix: fix double processing of AsyncOperations When a socket event occurs, the pending operations gets triggered to continue their work by calling the Process method. The changes in #37974 cause Process to be called twice on the same AsyncOperation. When Process is called, the operation can complete, and the AsyncOperation instance may be reused for a different operation. * Remove processAsyncEvents
No description provided.