atomic
Method call and atomicity
I have a method开发者_运维问答 with a single atomic operation, like this one int value; public void setValue(int value) {[详细]
2023-02-09 16:45 分类:问答Why is writing to a 24-bit struct not atomic (when writing to a 32-bit struct appears to be)?
I am a tinkerer—no doubt about that. For this reason (and very little beyond that), I recently did a little experiment to confirm my suspicion that writing to a struct is not an atomic operation, whi[详细]
2023-02-09 03:44 分类:问答When is it preferable to use volatile boolean in Java rather than AtomicBoolean? [duplicate]
This question already has answers here: Volatile boolean vs AtomicBoolean (12 answers) Closed 3 years ago.[详细]
2023-02-08 17:13 分类:问答Thread-safety and atomic reading in Windows OS
I have this piece of code in my application. I suspect that it is not thread-safe, so decide to ask the SOers.[详细]
2023-02-08 07:35 分类:问答transactions using deuce stm
I am trying to revert object state on exceptions. My code is like:: public class DeuceTXTest { @Atomic public void myTransactionMethod(HashMap<String, String> myHashMap)[详细]
2023-02-07 14:21 分类:问答Is an inline function atomic?
Can linux context switch after unlock in the below code if so we have a problem if two threads call this[详细]
2023-02-07 12:14 分类:问答Modular increment with Java's Atomic classes
I was surprised that Java\'s AtomicInteger and AtomicLong classes don\'t have methods for modular increments (so that the value wraps around to zero after hitting a limit).[详细]
2023-02-07 10:35 分类:问答Implement ZMOVE with WATCH in Redis
The Redis documentation on transactions gives an example of how to implement 开发者_开发百科ZPOP. How do I implement ZMOVE for Redis sorted sets (analagous to SMOVE)?Is this right? .. to move an eleme[详细]
2023-02-07 03:37 分类:问答Using xadd for different integer widths
I\'m currently porting atomic.hpp out of boost for a project and would like to generalize the atomic add function whereby it\'s templated on the type to add:[详细]
2023-02-07 02:12 分类:问答What operations in Java are considered atomic?
What operation开发者_StackOverflow社区s in Java are considered atomic? all assignments of primitive types except for long and double[详细]
2023-02-06 11:03 分类:问答