Is a 1:* write:read thread system safe?

Posted by Di-0xide on Programmers See other posts from Programmers or by Di-0xide
Published on 2012-08-31T12:16:01Z Indexed on 2012/08/31 15:52 UTC
Read the original article Hit count: 185

Filed under:

Theoretically, thread-safe code should fix race conditions. Race conditions, as I understand it, occur because two threads attempt to write to the same location at the same time.

However, what about a threading model in which a single thread is designed to write to a location, and several slave/worker threads simply read from the location?

Assuming the value/timing at which they read the data isn't relevant/doesn't hinder the worker thread's outcome, wouldn't this be considered 'thread safe', or am I missing something in my logic?

© Programmers or respective owner

Related posts about multithreading