Restore init thread-local var in mdc.h, not use reference-init

This commit is contained in:
lixingcong 2024-08-20 08:21:38 +08:00
parent d89fff6c7c
commit 8841b7e2d5
No known key found for this signature in database
GPG Key ID: FA7E30D337A91091

View File

@ -38,7 +38,7 @@ public:
static void clear() { get_context().clear(); }
static mdc_map_t &get_context() {
static thread_local mdc_map_t& context = *new mdc_map_t;
static thread_local mdc_map_t context;
return context;
}
};