Threading libsmbclient - a proposal.
hyc at highlandsun.com
Tue Apr 7 23:50:25 GMT 2009
Jeremy Allison wrote:
> On Tue, Apr 07, 2009 at 04:15:26PM -0700, Howard Chu wrote:
>> We often find the need for a trylock() op - fail immediately if the lock
>> is in use, instead of waiting.
> I thought about that one, but I don't see an immediate need
> for it in our code which will be mainly mutex locks around
In that case, your prototype is deceptive - you advertise read locks and write
locks, which are typically held for the duration of a lengthy operation, not
just taken and released quickly. If you're only expecting these locks to be
used to essentially support atomic test-and-set, then the RDLOCK and WRLOCK
usage makes no sense.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
More information about the samba-technical