What is the meaning of the term “thread-safe”?

前端 未结 18 1917
孤独总比滥情好
孤独总比滥情好 2020-11-22 13:51

Does it mean that two threads can\'t change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple t

18条回答
  •  温柔的废话
    2020-11-22 14:00

    Thread-safe code is code that will work even if many Threads are executing it simultaneously.

    http://mindprod.com/jgloss/threadsafe.html

提交回复
热议问题