mgravell / Pipelines.Sockets.Unofficial

.NET managed sockets wrapper using the new "Pipelines" API
Other
400 stars 51 forks source link

Remove AOT deoptimization #78

Closed MichalStrehovsky closed 7 months ago

MichalStrehovsky commented 7 months ago

I looked at this because of https://github.com/mgravell/Pipelines.Sockets.Unofficial/pull/73#discussion_r1180567340.

Digging in code history, I saw that the reflection was there because previously this was T: unmanaged and we'd need "bridging constraints" feature to avoid reflection here: https://github.com/dotnet/csharplang/discussions/6308.

But I see that the where T : unmanaged is no longer there and neither is the reflection. Can we not just take this code path?

Cc @eerhardt