No side effects of an atomic operation are visible until the action is complete.
这些原子操作属于Atomics模块。
The Atomic operations are installed on an Atomics module.
对每条消息执行原子操作没有太多意义。
There's not much point in doing an atomic operation for each message.
首先,识别原子操作。
First, identify the atomic operations.
原子操作可以让你在32位或64位的处理器上面执行简单的数学和逻辑的运算操作。
Atomic operations let you perform simple mathematical and logical operations on 32-bit or 64-bit values.
尽管锁和条件在并发设计中使用非常普遍,原子操作也是另外一种保护和同步访问数据的方法。
Although locks andconditions are very common in concurrent design, atomic operations are another way to protect and synchronize access to data.
一般而言,原子操作指的是由多步组成的一个操作。
In general, the term atomic operation refers to an operation that is composed of multiple steps.
此原子操作保证在写上修改的值之前不会发生其他写操作。
This atomic operation guarantees that no other write happens until the modified value is written back.
原子操作使用特殊的硬件设施来保证变量的改变在其他线程可以访问之前完成。
Atomic operations use special hardware instructions to ensure that modifications to a variable are completed before other threads have a chance to access it.
相反,它可以使用单个原子操作将所有未决消息移动到队列的“预读”部分。
Instead, it can move all the pending messages toa"pre-read" portion of the queue using a single atomic operation.
普通的操作都是顺序的原子操作,因此分区总是在两笔操作之间开始。
Normal operation is a sequence of atomic operations, and thus partitions always start between operations..
原子操作是同步的一个简单的形式,它处理简单的数据类型。
Atomic operations are a simple form of synchronization that work on simple data types.
注意:incr()必须仍然使用synchronize,因为mValue++不是单个原子操作。
(Note incr() must still use synchronize sincemValue++ is otherwise not a single atomic operation.).
Unlike memory_order_relaxed, this allows such atomic operations to be used to communicate the progress of one thread to another.
锁和原子操作通常包含了内存屏障和内核级别同步的使用来确保代码正确被保护。
Locks and atomic operations generally involve the use of memory barriers and kernel-level synchronization to ensure code is properly protected.
原子操作在以下情况的时候提供了替代锁的轻量级的方法,其中你可以执行标量数据类型的数学或逻辑运算。
Atomic operations offer a lightweight alternative to locks in situations where you can perform mathematical or logical operations on scalar data types.
中文
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt