我遇到了这一行“一些函数本质上是线程安全的,例如memcpy()
”
Wikipedia将“线程安全”定义为:
A piece of code is thread-safe if it only manipulates shared data structures in a manner that guarantees safe execution by multiple threads at the same time.
好的。但是固有是什么意思呢?和继承有关吗?
最佳答案
与继承无关。这是一个非正式的表达方式,意思更像
“某些函数本质上是线程安全的”。例如一个函数没有
touch任何共享值/状态无论如何都是线程安全的,即“本质上是线程安全的”。
关于java - "inherently thread-safe"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22908520/