Created
February 22, 2018 12:40
-
-
Save rkravchik/cb2a12bc73c7d63b8663bae1f9e6b566 to your computer and use it in GitHub Desktop.
sync.Pool main destination
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/golang/go/issues/8232#issuecomment-66096118 | |
Put another way, sync.Pool is for answering the question "how do I decide when to drop | |
this cached thing that otherwise would never die". The suggestion here is to use it to | |
answer the question "how can I make this thing fast". That's a mistake, even if the | |
implementation can satisfy both today. If it starts getting used for these two different | |
things, then we will not be able to change it, because optimizing for one case will hurt | |
the other. | |
Russ Cox |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment