Is Ruby's stdlib Logger class thread-safe?

后端 未结 4 720
长情又很酷
长情又很酷 2021-01-03 18:31

In short, is the standard library Logger class in Ruby thread-safe? Only useful info Google turned up was someone on a forum saying it \"seems\" thread-safe. And I don\'t fe

4条回答
  •  情深已故
    2021-01-03 19:01

    Some Ruby classes are designed to be thread safe, but don't explicitly say so in words of one syllable in their documentation. Unlike documentation in other programming languages such as PHP.

    I remember being asked whether Queue was thread-safe on Stack Overflow, and even though it was, the documentation didn't spell that out.

提交回复
热议问题