-
Notifications
You must be signed in to change notification settings - Fork 54
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
Is JsonTransformer thread-safe? #270
Comments
Current version should be thread-safe. |
I am using latest 4.3.0 and its not acting thread-safe, above code snippet scenario can validate it. |
You're right, different instances of JsonTransformer work fine, but the same instance does not, there's a property, JUSTContext, that is read and set throughout the code... |
JUSTContext have setting values, transformer and inputs are not part of it, so how JUSTContext can help here? Is it a bug?
|
Input is a property of JUSTContext (internal), it is set at the beginning of the tranformation, and it is changed whenever is needed (for example, multiple transformations use it, I'm not sure but maybe #applyover and loops also...) |
So, sounds like JsonTransformer is not thread-safe in true sense and we should re-instantiate JsonTransformer for each transformation. |
Not thread-safe at all... One thing to check |
Are there any plans to release this fix to nuget? |
Hello JUST.net,
I am using JsonTransformer with single instance and when in multi-thread environment I am doing transform then results are not expected. Below code fails when jsonTransformer is declared outside the parallel loop but it works if jsonTransformer is declared inside loop context. How are we suppose to use JsonTransformer ? is it thread-safe?
Thanks
The text was updated successfully, but these errors were encountered: