Skip to content

Commit 86f085b

Browse files
committed
Make it a bit more multithreading friendly
1 parent ac372d2 commit 86f085b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib_json/json_reader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@
4545
#endif
4646

4747
static int const stackLimit_g = 1000;
48+
#if __cplusplus >= 201103L
49+
thread_local static int stackDepth_g = 0; // see readValue()
50+
#else
4851
static int stackDepth_g = 0; // see readValue()
52+
#endif
4953

5054
namespace Json {
5155

0 commit comments

Comments
 (0)