Top "Thread-safety" questions

A piece of code is thread-safe if it only manipulates data structures in a way that allows consistent execution of this code by multiple threads.

Are redis operations on data structures thread safe

How does Redis handle multiple threads (from different clients) updating the same data structure in Redis ? What is the recommended …

thread-safety redis
Redirecting stdout and stderr to a PyQt4 QTextEdit from a secondary thread

Stack overflow. Once again, I come to you in a time of dire need, teetering precariously on the brink of …

python multithreading thread-safety pyqt stdout
Is this (volatile bool) always thread safe?

I'm wondering if this is completely thread-safe and whether or not the volatile keyword should be in place. using System.…

c# thread-safety volatile
Thread safe implementation for Hash Map

First, I'll describe what I want and then I'll elaborate on the possibilities I am considering. I don't know which …

java thread-safety concurrenthashmap locks
Is SqlConnection / SqlCommand thread safe?

I am currently creating a WCF web service. As part of its job, it will unfortunately need to do some …

c# multithreading locking thread-safety sqlcommand
Thread safe queue (list) in .net

I need to create a thread safe list of items to be added to a lucene index. Is the following …

c# multithreading thread-safety lucene.net
Pattern for lazy thread-safe singleton instantiation in java

the lazy thread-safe singleton instantion is kinda not easy to understand to every coder, so i wanted to create a …

java thread-safety singleton instantiation lazy-evaluation
Are primitive data types in c# atomic (thread safe)?

For example, do I need to lock a bool value when multithreading?

c# atomic primitive thread-safety
Can we declare SimpleDateFormat objects as static objects

SimpleDateFormat monthFormat = new SimpleDateFormat("MMMM"); SimpleDateFormat fullFormat = new SimpleDateFormat("EE MMM dd, HH:mm:ss") I have several such piece …

java thread-safety simpledateformat
What is the correct way of adding thread-safety to an IDisposable object?

Imagine an implementation of the IDisposable interface, that has some public methods. If an instance of that type is shared …

c# .net thread-safety idisposable