-
-
Notifications
You must be signed in to change notification settings - Fork 702
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
Offer API to adjust the ArrayPool #1122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good. Thanks for contributing. Just a couple of hopefully small comments.
src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs
Show resolved
Hide resolved
src/MessagePack.UnityClient/Assets/Scripts/MessagePack/Utilities.cs
Outdated
Show resolved
Hide resolved
Issue with metgod WithPool was fixed;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. @neuecc Do you have anything else to add?
src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackSerializerOptions.cs
Outdated
Show resolved
Hide resolved
src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs
Outdated
Show resolved
Hide resolved
src/MessagePack.UnityClient/Assets/Scripts/MessagePack/MessagePackStreamReader.cs
Outdated
Show resolved
Hide resolved
Looks fine. I don't have anything to add. |
I think it's very good (I also wanted the opportunity to expand the size of the Pool, so I'm personally happy too), thank you. |
Hey! We have had problems on our production server with ArrayPool from the .net framework in the MP library.
GC couldn't stop some message pack threads that were in spin lock in the critical section, so the server had random long Stop The World sometimes (some of them reached up to 10 seconds).
So we want to use TlsOverPerCoreLockedStacksArrayPool from .net core. We can take it from core repo to our code, but we can't change DefaultArrayPool to that pool in MP. That’s why I decided to add the possibility to change ArrayPool implementation.
P.S. We are using .net 4.7.2.