Если вы профилируете простое клиентское приложение, использующее SocketAsyncEventArgs
, вы заметите Thread
и ExecutionContext
распределения.
Источником распределений является SocketAsyncEventArgs.StartOperationCommon
, который создает копию ExecutionContext с ExecutionContext.CreateCopy()
.
ExecutionContext.SuppressFlow
кажется хорошим способом подавить это распределение. Однако сам этот метод будет генерировать распределения при запуске в новом потоке.
Как я могу избежать этих распределений?