Take the 2-minute tour ×

Is there any potential for issues when having multiple threads read static values or can they be read by any number of threads concurrently without issues? (C#)

share|improve this question

3 Answers 3

up vote 3 down vote accepted

concurrent reads are perfectly fine, provided that there is not a write operation at the same time.

share|improve this answer

Yes, static members can be read concurrently without any issue. What you need to be worried about is write operations. In most cases it is best to block all threads while you write to guarantee that no concurrency issues are introduced by the write operation.

But concurrent reads without any writes will work perfectly without the need for blocking or any concurrecy-related corruption.

share|improve this answer

They will be fine until we reach the era of quantum computing, at which point the Heisenberg uncertainty principle indicates that reads will start behaving suspiciously like writes.

At least, that'd be pretty funny. In reality I know essentially nothing about quantum computing.

I think you're fine.

share|improve this answer

Your Answer


