-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move (ReadOnly)Span.DangerousGetPinnableReference to MemoryMarshal #24207
Comments
Not sure. We should measure.
|
FYI: The API review discussion was recorded - see https://youtu.be/o5JFZtgaJLs?t=76 (17 min duration) |
Can we do this only after we get pinning support in the compiler? |
This issue is primarily about adding the new non-Dangerous APIs. The new APIs are orthogonal to the compiler pinning support.
This should be attacked separately, once the compiler pinning support is figured out. The current proposal is that these methods will stay and they will be used by the compiler pinning support: dotnet/csharplang#1100 |
Changing the API to the following based on feedback from @VSadov, @jkotas: public static class MemoryMarshal
{
public static ref T GetReference<T>(in ReadOnlySpan<T> span);
public static ref T GetReference<T>(in Span<T> span);
} |
Can you not remove the instance methods until ASP.NET is updated as well? It would be nice to avoid breaking everything all at once. |
I have updated corefx/corert/coreclr. What is left is aspnet and corefxlab. On the aspnet side, which repos would require updates? SignalR and Kestrel or are there others? |
See aspnet/KestrelHttpServer#2222 Depends on a package update to aspnet/Universe to go through - aspnet/Universe#717
|
Separated from https://github.com/dotnet/corefx/issues/23879#issuecomment-341482899
We should also rename it as part of the move. Pinnable does not make sense if it is not going to be used for pinning. And Dangerous can be omitted too because of methods under
System.Runtime.InteropServices
are dangerous by convention.So what about:
The text was updated successfully, but these errors were encountered: