You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current logger implementation is not thread-safe, so the commit rewrites
it. Firstly, `localtime` is not thread-safe since it uses a static
buffer under the hood. We don't use its result anyway (we somewhy
obtain current time but don't print it), so let's simply drop it.
Secondly, despite the fact `std::cout` and `std::cerr` are thread-safe
according to C++11 standard, some compilers don't stick to this contract
so they shouldn't be actually used from multiple threads without
synchronization. Let's simply use `write` instead - it is guaranteed to
be thread-safe.
Part of #110
0 commit comments