Skip to content

Preventing undefined thread ids in child processes

Gabi Melman edited this page Nov 25, 2017 · 5 revisions

By default spdlog saves thread ids in thread local storage to gain a few micros for each call, but if your program forks, you must uncomment the SPDLOG_DISABLE_TID_CACHING flag in tweakme.h.

This will prevent prevent undefined thread ids in child processes:

#define SPDLOG_DISABLE_TID_CACHING
Clone this wiki locally