-
Notifications
You must be signed in to change notification settings - Fork 178
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
fatal error: concurrent map writes #75
Comments
How are you using this? Policy creation is not thread safe, and you should create the policy at startup (or guaranteed just once if you lazy create it later). Sanitization is thread safe and once a policy has been created you can use it across multiple goroutines safely assuming you are not modifying the policy. |
I have it at a package level global variable. I then just use it in a function
|
Yup, it is the modifying of the policy that isn't thread safe. I'll drop an example in here once I'm at work. |
Huh. |
We use bluemonday in our golang service and under high load and traffic we are noticing the error below
fatal error: concurrent map writes
The text was updated successfully, but these errors were encountered: