Skip to content
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 map_struct_to_json thread safe? #11

Open
byrnexu opened this issue Mar 31, 2022 · 1 comment
Open

Is map_struct_to_json thread safe? #11

byrnexu opened this issue Mar 31, 2022 · 1 comment

Comments

@byrnexu
Copy link

byrnexu commented Mar 31, 2022

The following code sometimes gets the first half of json, I suspect it is because of the result of calling in a multi-threaded environment, the following fieldinfo is a local variable

struct_mapping::map_struct_to_json(fieldInfo, oss, " ");

@bk192077
Copy link
Owner

bk192077 commented Apr 2, 2022

No, struct_mapping is not thread safe. But perhaps that's not the point. It would be nice to see a more detailed code example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants