From 86f085b810ef584f4ae97e1d90b887c358c5403b Mon Sep 17 00:00:00 2001 From: "Kirill V. Lyadvinsky" Date: Thu, 3 Nov 2016 22:45:36 +0300 Subject: [PATCH] Make it a bit more multithreading friendly --- src/lib_json/json_reader.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 5e04d74..d5ff46d 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -45,7 +45,11 @@ #endif static int const stackLimit_g = 1000; +#if __cplusplus >= 201103L +thread_local static int stackDepth_g = 0; // see readValue() +#else static int stackDepth_g = 0; // see readValue() +#endif namespace Json {