|
-
January 28th, 2009, 05:03 AM
#1
[RESOLVED] error resistant read and multithreading
Suppose that two threads share the same variable, say, an array of int's (in general, a POD type); the first thread regularly writes and reads from/to that variable and the second thread only needs read access to it;
furthermore, the second thread doesn't need an "error free" view of that variable: I mean, it can estimate the consistency of the read and it doesn't matter if occasionally the read value is inaccurate or even totally inconsistent.
My question is, is doing this without any synchronization mechanism safe ? (i.e. is there any side effect other then the possibly inconsistent read of the variable ? )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|