On 8/18/00, Dave Watts penned:
>So, if you're locking session variables, and you're using 4.0.x so you don't
>have the SCOPE attribute, you want your lock to allow only one request to
>change those variables at any one time. Since sessions are unique to
>individual users, you'll want your lock name to be unique to individual
>users as well. You don't want to lock ALL session variables with an
>individual lock, just the session variables which belong to that user.

Well, you lose me there. You say: "you'll want your lock name to be 
unique to individual users AS WELL". How do you make the lock unique 
to individual users AND lock out other users as well?

It still seems to me that if the locks have names unique to the user, 
then someone else could be writing to that session variable as 
another user is accessing it. Or that several people could be writing 
to the same session variable at once. I thought that the whole idea 
behind locks was to stop multiple users from accessing the same 
session variable at once.

Even in 4.51, If you use an exclusive lock with a scope of "Session", 
how does CF know which session variable access to lock? By the 
variable name? By a combination of the variable name and application 
name? Or does it stop all reads and writes to all session variables 
across the whole server?

>
>In the case of session variables, it shouldn't matter which application
>they're in, as long as each lock is scoped in such a way as to make it
>unique to that individual user.

Same question. Same blank stare. LOL

If a lock is named unique to a user, what stops another user from 
writing to it while it's being accessed or from two users writing to 
it at once?

>
>  >
>>  Would the second query be locked out while the first is being written
>>  since the locks are named the same (even though they are accessing
>>  different session variables)? If so, then it seems like it would be
>>  detrimental to name any 2 locks the same that don't contain
>>  references to the same session variable. I'm assuming this is the
>>  case.
>
>You're not really trying to lock an individual session variable; you're
>trying to lock the Session scope. In any case, in the example above, the
>second block of code won't execute until the first has completed anyway,
>since a CF script is essentially a command batch.

Well, that was my question. Which was basically: Does CF not care 
what's inside of the lock and only look at the name?
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to