[Date Prev][Date Next]
RE: AttributeDescription caching (was: some problems after your commits)
> -----Original Message-----
> From: Pierangelo Masarati [mailto:firstname.lastname@example.org]
> second, in slap_bv2ad there's a problem in that you go thru the
> list with no read lock in place; this means some other thread might
> change the list while you're going thru it. This should be considered
> non-reentrant. A rdwr lock read-locked at the beginning should also
> allow to get rid of the cross-check you do to ensure no other thread
> inserted the AttributeDescription.
One more comment here - since there is no way to promote an existing
read lock to a write lock, you have to release the read lock and try
to reacquire the write lock. As such, the cross-check is still needed.