Is this use of a static queue thread-safe?

后端 未结 4 827
长情又很酷
长情又很酷 2020-12-10 14:16

The msdn documentation states that a static generic Queue is thread-safe. Does this mean that the following code is thread-safe? In other words, is there a problem when a th

4条回答
  •  甜味超标
    2020-12-10 14:48

    What MSDN states is that static methods of Queue are thread-safe, not that instance methods of a static instance are thread-safe.

提交回复
热议问题