You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even in .NET 9.0, it is still not possible to create var channel = Channel.CreateUnbounded<a ref struct>();. The 13.0 syntax already has where T : allows ref struct.
The text was updated successfully, but these errors were encountered:
Dear Sir or Miss.
This is an e-mail from Johnnie' QQ Mail.Thank you for your E-mail.I apologize that I am unable to respond to you immediately . I will get back to you as soon as I return.
This does not look feasible. If T is e.g. Span<int>, then it can point to a stackalloc int[1] in the stack of a thread, and if such a value is written to the channel and later read back from there, then the stack frame may have been freed already. If Channel<T>, ChannelWriter<T>, etc. were ref struct types themselves, then the C# compiler could perhaps detect this ref-safety violation; but they are class types.
Even in .NET 9.0, it is still not possible to create
var channel = Channel.CreateUnbounded<a ref struct>();
. The 13.0 syntax already haswhere T : allows ref struct
.The text was updated successfully, but these errors were encountered: