-
I can't get from the documentation if they actually are. For instance, if I get a queue, can two (or more) different JVM's read from it and get different values? e.g. the following code running on different JVM's RQueue<String> queue = redis.getQueue(KEY);
queue.poll(); Would every JVM get a different value (granted the content of the queue are different) or do I need a to lock first? e.g. RLock lock = redis.getLock(LOCK_KEY);
lock.lock();
try {
RQueue<String> queue = redis.getQueue(KEY);
queue.poll();
} finally {
lock.unlock();
} |
Beta Was this translation helpful? Give feedback.
Answered by
mrniko
Jan 20, 2024
Replies: 1 comment 1 reply
-
All collection implementations are thread safe. You don't need to use locks |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mrniko
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All collection implementations are thread safe. You don't need to use locks