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
It is thread-safe in the sense that there are no data races but the output is not atomic meaning that text style changes and the text from different threads may interleave. It can be made atomic by placing both escape sequences that control text style and the formatted text into memory_buffer and then writing them to file in one go. PRs are welcome =).
tankiJong
added a commit
to tankiJong/fmt
that referenced
this issue
Oct 9, 2019
Hi,
I was testing the code in multiple threads and I observed different behavior for
fmt::print
:With code
I got:
With code
I got:
Notice that items were missing color. And the only difference in code is just two lines above.
So I am wondering is that because the
print
is not thread-safe? Or actually some other issues going on.Thanks for the help :)
The text was updated successfully, but these errors were encountered: