I just wanted to use the built-in JSON functions, but functions like JSONErrorLine(), JSONErrorMessage() and JSONErrorPosition() do not accept any parameter.
How do I get the right text for the thread reliably? Or is the function itself thread-safe? So an error is not overwriting the results of a previous error in another thread? The documentation does not mention thread-safety for the JSON functions at all...
[done] Is PB JSON implementation thread-safe?
[done] Is PB JSON implementation thread-safe?
Last edited by Kukulkan on Fri Aug 18, 2017 1:13 pm, edited 1 time in total.
Re: Is PB JSON implementation thread-safe?
Yes, it's threadsafe, a thread local storage is used for these function. In PB if nothing is mentioned, it's threadsafe (if you check the thread safe switch), or it's a bug.
Re: Is PB JSON implementation thread-safe?
Great! Thanks Fred
-
- Addict
- Posts: 4519
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Is PB JSON implementation thread-safe?
Also thanks from me! That's good to know.
Maybe this information could be added to the PureBasic JSON documentation?
Maybe this information could be added to the PureBasic JSON documentation?