Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

Question: packr.Box Safe for concurrent access? #19

Closed
alexsasharegan opened this issue Nov 13, 2017 · 1 comment
Closed

Question: packr.Box Safe for concurrent access? #19

alexsasharegan opened this issue Nov 13, 2017 · 1 comment

Comments

@alexsasharegan
Copy link

I've tested concurrent box access with race detection and load testing, and the answer to this question seems to be yes.

Could you add a line in the docs regarding a box's safety for concurrent access? Or best practices for using boxes? Are they extremely cheap to make, or should they be passed around via pointers? I'm relatively new as a go dev, so this sort of info is very helpful. Thank you!

@markbates
Copy link
Member

They are safe for concurrent access and they are very cheap to make, no need to pass around pointers at all. Feel free and ask questions anytime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants