Thread Local Storage(TLS) is slow. (TLPI Ch.31.3.1, Ch.31.4)
Discussion thread:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-nuts/tGamryo50BY/gKxPGwBdAwAJ
Steps:
Discussion thread:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/golang-nuts/tGamryo50BY/gKxPGwBdAwAJ
Steps:
- Using runtime.LockOSThread to lock this go-routine to the underlying P
- Call cgo/c SO.
- Use channel to pass down messages, other go-routine might be scheduled out of this P(most likely won't if listen to same channel)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.