Ah, there's the rub. Silly me.

Sean

-----Original Message-----
From: Rob Mayoff [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 10, 2001 9:38 PM
To: Sean Owen
Cc: '[EMAIL PROTECTED]'
Subject: RE: nsv vs. ns_cache vs. ns_share


+---------- 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