Make Exception::what() thread-safe

This commit is contained in:
刘皓 2025-08-10 10:01:02 -04:00
parent 8e85e59ed8
commit 0fb327c93e
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -81,7 +81,7 @@ struct Exception
const char *what() const
{
static std::string buf;
static thread_local std::string buf;
buf.clear();
switch (type)
{