Re: [Tutor] Locking a specific variable (fwd)

2006-04-24 Thread Danny Yoo
-- Forwarded message -- Date: Mon, 24 Apr 2006 07:32:04 -0400 From: Tino Dai [EMAIL PROTECTED] To: Danny Yoo [EMAIL PROTECTED] Subject: Re: [Tutor] Locking a specific variable Hey there Danny, I'm not quite sure I get it, but ok. *grin* I'll assume that fileQueue is an

Re: [Tutor] Locking a specific variable (fwd)

2006-04-24 Thread Danny Yoo
# The way I would like to do it, so we have two different instances of the same variable, and only # one function can access it at a time. If a function comes to that variable and finds a lock on it, # it will wait until the lock is released. And the variable happens to be a queue Hi

Re: [Tutor] Locking a specific variable (fwd)

2006-04-24 Thread Kent Johnson
Yup, I'm familiar with those. In all of the examples, I have seen, the critical region happens in one specific area eg a part of a function with a lock and release around it. My question is there a way to lock a specific variable so that even though other functions are attempting to access it,