-
Notifications
You must be signed in to change notification settings - Fork 108
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
Performances and Multithreading #174
Comments
Hi @emabiz, glad to hear you're finding the library useful. I haven't done any testing with regard to concurrency. The Validator is more-or-less stateless. While it is validating a particular document, pretty much everything relevant to that document lives on the stack, or in short-lived heap allocations. However, there are two risks that come to mind:
In the case of 1), I believe that would be ease enough to address using std::mutex. Hope that helps! |
Hi, Not clear the case 2.
Also not sure if the mutex can be released immediately after the validate, or if it must be locked also during results error context manipulation. Thank you |
Hi,
first of all thank you for your job.
I tried the library parsing nlohmannjson objects.
Performances are good parsing a lot of objects using one pre-created validator.
What is the expected behavior using the same validator by multiple threads that work concurrently?
Must be the access to validator locked?
Thank you
The text was updated successfully, but these errors were encountered: