FROM : Scott Ribe
DATE : Thu May 08 17:33:50 2008
> What is sounds like you're saying is something like:
No, not exactly, because you know that str is constant and its value is set
at load time, so multiple readers without locks will be safe.
However, what he was responding to was much more broad, and not correct:
> Now if two threads are just reading the same piece of data it's ok
> for them to do so at the same time,
When was the data written? Unless you're dealing with const data, then you
still require synchronization primitives ON THE READS, to make sure that the
cache of the processor executing the reads is refreshed from main memory as
needed. Unless, of course, you know the exact details of the processor
you're running on and that this is not necessary.
--
Scott Ribe
<email_removed>
http://www.killerbytes.com/
(303) 722-0567 voice
DATE : Thu May 08 17:33:50 2008
> What is sounds like you're saying is something like:
No, not exactly, because you know that str is constant and its value is set
at load time, so multiple readers without locks will be safe.
However, what he was responding to was much more broad, and not correct:
> Now if two threads are just reading the same piece of data it's ok
> for them to do so at the same time,
When was the data written? Unless you're dealing with const data, then you
still require synchronization primitives ON THE READS, to make sure that the
cache of the processor executing the reads is refreshed from main memory as
needed. Unless, of course, you know the exact details of the processor
you're running on and that this is not necessary.
--
Scott Ribe
<email_removed>
http://www.killerbytes.com/
(303) 722-0567 voice
| Related mails | Author | Date |
|---|---|---|
| Karl von Moller | May 6, 04:17 | |
| John Calhoun | May 6, 04:35 | |
| Michael Vannorsdel | May 6, 06:28 | |
| Karl von Moller | May 6, 06:46 | |
| Michael Vannorsdel | May 6, 07:12 | |
| Karl von Moller | May 6, 08:07 | |
| Michael Vannorsdel | May 6, 12:19 | |
| Karl von Moller | May 6, 13:04 | |
| Michael Vannorsdel | May 6, 13:10 | |
| Karl von Moller | May 6, 13:19 | |
| Michael Vannorsdel | May 6, 14:00 | |
| Karl von Moller | May 6, 15:25 | |
| Michael Vannorsdel | May 6, 16:52 | |
| Michael Ash | May 6, 18:34 | |
| Chris Hanson | May 8, 07:26 | |
| Michael Vannorsdel | May 8, 08:20 | |
| Chris Hanson | May 8, 08:45 | |
| Michael Vannorsdel | May 8, 09:16 | |
| Scott Ribe | May 8, 17:33 | |
| Michael Vannorsdel | May 9, 04:49 | |
| Timothy Reaves | May 9, 17:49 |






Cocoa mail archive

