我经常碰到线程安全"这两个关键术语,想知道这意味着什么.例如,在Firebase或Realm中,某些对象被视为线程安全".线程安全对什么意味着什么?
I often come across the key terms "thread safe" and wonder what it means. For example, in Firebase or Realm, some objects are considered "Thread Safe". What exactly does it mean for something to be thread safe?
线程不安全-如果允许多个线程同时修改任何对象.线程安全-如果不允许多个线程同时修改任何对象.
Thread Unsafe - If any object is allowed to modify by more than one thread at the same time. Thread Safe - If any object is not allowed to modify by more than one thread at the same time.
通常,不可变对象是线程安全的.
这篇关于在iOS中线程安全是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程技术网(www.editcode.net)!