H
HONOREDANCESTOR
I am modifying some code that uses 'events' to add to a buffer.
Suppose I want to write a routine that will read from the buffer at
timed intervals. Is there a danger that when I read from the buffer,
an event will suddenly be raised in the middle of my read, and that
event will modify the buffer?
And would using threads prevent this?
Thanks,
-- HA
Note: My read actually should remove info from the buffer as it reads
- so its modifying the buffer.
Suppose I want to write a routine that will read from the buffer at
timed intervals. Is there a danger that when I read from the buffer,
an event will suddenly be raised in the middle of my read, and that
event will modify the buffer?
And would using threads prevent this?
Thanks,
-- HA
Note: My read actually should remove info from the buffer as it reads
- so its modifying the buffer.