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.

Collection was modified; enumeration operation may not execute

I can't get to the bottom of this error, because when the debugger is attached, it does not seem to …

c# wcf concurrency dictionary thread-safety
What is thread safe or non-thread safe in PHP?

I saw different binaries for PHP, like non-thread or thread safe? What does this mean? What is the difference between …

php multithreading package thread-safety threadcontext
How does lock work exactly?

I see that for using objects which are not thread safe we wrap the code with a lock like this: …

c# .net synchronization locking thread-safety
Thread-safe List<T> property

I want an implementation of List<T> as a property which can be used thread-safely without any doubt. …

c# collections properties thread-safety
Java synchronized method lock on object, or method?

If I have 2 synchronized methods in the same class, but each accessing different variables, can 2 threads access those 2 methods at …

java multithreading thread-safety locking synchronized
Android - Best and safe way to stop thread

I want to know which is the best way to stop a thread in Android. I know I can use …

android thread-safety
How to stop a thread created by implementing runnable interface?

I have created class by implementing runnable interface and then created many threads(nearly 10) in some other class of my …

java multithreading thread-safety
Why is Java's SimpleDateFormat not thread-safe?

Please tell with a code example why is SimpleDateFormat not threadsafe. What is the problem in this class? Is The …

java thread-safety simpledateformat
Automating the InvokeRequired code pattern

I have become painfully aware of just how often one needs to write the following code pattern in event-driven GUI …

c# multithreading winforms thread-safety invokerequired
What is thread Safe in java?

Possible Duplicate: What does threadsafe mean? I am very confused that any class is Thread safe. I am understanding that, …

java thread-safety