WaitForSingleObject is a lock. Nothing lock-free about that!
yes, hehe, that's a lock, but as i was trying to explain to Joe, I
wasn't intending it to be used to lock the vector, but rather as a
thread sleeper. perhaps there's a better way of doing that, i don't
know and didn't research how to do it via threading. this all seems to
be moot though as i think using an stl vector for this might not be
the best approach.
i think you guys have a basic concept of what i'm trying to do though
(efficient swsr fifo msg queue), so any suggestions or alternative
solutions would be much appreciated.
best regards guys and thanks for your comments,
marcus
a circular buffer. Try a google on "lock free circular buffer". In this
increment and compare the two indexes. Not totally lock free either,
but necessary for "memory fence" reasons.