diff options
author | Yingchi Long <i@lyc.dev> | 2023-07-03 16:02:54 +0800 |
---|---|---|
committer | Yingchi Long <i@lyc.dev> | 2023-07-03 16:05:43 +0800 |
commit | 3c90340fe64fb18e66f02a648ebce8ad629482a5 (patch) | |
tree | f843f180f20cdb60651c5a6dad1f3c26c77080af /src/libcmd/legacy.cc | |
parent | 7b39a388b382e7912de3c5951faad42fe2d72f48 (diff) |
libexpr: use `thread_local` to make the parser thread-safe
If we call `adjustLoc`, the global variable `prev_yylloc` is shared
between threads and racy.
Currently, nix itself does not concurrently parsing files, but this is
helpful for libexpr users. (The parser is thread-safe except this.)
Diffstat (limited to 'src/libcmd/legacy.cc')
0 files changed, 0 insertions, 0 deletions