Fawzi Mohamed wrote:

a memory barrier would be needed, and atomic decrements, but I see that it is not portable...

It would also somewhat defeat the purpose of thread_needLock, since IMO this routine should be fast. If memory barriers are involved then it may as well simply use a mutex itself, and this is exactly what it's intended to avoid.


Sean

Reply via email to