How to define threadsafe?

后端 未结 8 2006
夕颜
夕颜 2020-12-31 11:48

Threadsafe is a term that is thrown around documentation, however there is seldom an explanation of what it means, especially in a language that is understandab

8条回答
  •  情话喂你
    2020-12-31 12:03

    Tread-safe code is code that won't fail because the same data was changed in two places at once. Thread safe is a smaller concept than concurrency-safe, because it presumes that it was in fact two threads of the same program, rather than (say) hardware modifying data, or the OS.

提交回复
热议问题