-
Notifications
You must be signed in to change notification settings - Fork 177
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
[Question] Is the Parser class thread safe? #44
Comments
It should be safe yes. Just create the Parser instance on app startup then pass the reference around. |
I have read the code with this in mind and could not find anything that wasn't thread safe from the Parser class. It uses java.util.regex.Pattern, which is thread safe and does not expose the Matchers outside of method scope. |
Gonna close this issue since it’s been resolved. Thanks @anttibrax |
Parser is thread-safe, so share it. ua-parser/uap-java#44 response time 700ms -> 200ms
Can someone tell me whether the
Parser
class is thread-safe?If I'm using the Parser class in multiple places, what is the best we to do it?
The text was updated successfully, but these errors were encountered: