forked from publicsuffix/list
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/internal: wrap use of collators in mutexes
Despite being a process of reading from read-only state, somehow these APIs turn out to be thread-unsafe, and parsing multiple PSLs concurrently in the same process results in data races and panics. Thankfully each use of the collator is quite short, so wrapping their use in a global mutex, while unfortunate, is acceptable. And enabling parallel parsing of PSLs speeds up online validations by a factor of 10x on many cored machines.
- Loading branch information
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
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
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