+---------- On Sep 10, Sean Owen said:
> This is true, but is atomicity really required? If you don't mind the memory
> being taken up for a few extra cycles, it seems to me that if you point the
> API at the new version of the hash table, you can poll the reference count
> for the old version once a second until it is zero, and then safely free the
> memory. What's a little busywaiting among friends?

What if two readers try to decrement the reference count
simultaneously?  One of the decrements will be missed and you'll never
stop polling.

Reply via email to