|
From: | Derek Robert Price |
Subject: | Re: CVS update: MODIFIED: src ... |
Date: | Fri, 08 Nov 2002 15:23:05 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
Larry Jones wrote:
Derek Robert Price writes:What happens right now if two tag readers are trying to upgrade to write-locks at the same time? Can they both have a read lock in the same directory and thus each prevent the other from upgrading to a write-lock?Right now, that code has been replaced due to that exact problem (which of course didn't occur to me *before* I checked in the change, only afterwards). Now, start_recursion takes a locktype argument that tells it whether to read or write lock each directory as it's processed.
Ah. Okay. Thanks.Seems to me an "I'm waiting to upgrade to a write lock" lock would work just as well. Such a lock could prevent the creation of any other locks and other readers waiting for an upgrade could release their read locks in preference of the first server with an "upgrade" lock.
I haven't studied the problem though. Would that be any more efficient than what you did?
Derek -- *8^) Email: derek@ximbiot.com Get CVS support at <http://ximbiot.com>! -- Cynic: Someone who smells the flowers and looks for the casket
[Prev in Thread] | Current Thread | [Next in Thread] |