The point I was trying to make wasn't because of the CF version - it's just
sometimes locking is not related to variables but to external resources
(just as an example a single threaded COM Object to connect to a mainframe
DB).

In that case the lock should be named for that resource and thus not affect
other parts of the application:
only if someone accessed exactly the same fuse they would be blocked until
the lock is released.

Noam

        ----------
        From:  Nat Papovich [SMTP:[EMAIL PROTECTED]]
        Sent:  Wednesday, 11 October 2000 18:05
        To:  Fusebox
        Subject:  RE: Application vs. Server Scope

        There are two different syntaxes for CF 4.0.1 and CF 4.5. The syntax
listed
        below is for 4.0.1, the syntax for 4.5 is different. You should look
it up.

        There shouldn't be any problem with locking an entire circuit app or
even
        the whole app. But, for the life of me, I cannot figure out why you
would
        need to lock an entire application, and not just the variable calls.
        Although this wasn't your initial question, if you provide the list
with
        some additional info about your unique situation, we might be able
to come
        up with a better scenario than locking the whole app.

        Nat Papovich
        ICQ 32676414
        "If it was hard to write," 
        says the Real Programmer,
        "it should be hard to understand."


        -----Original Message-----
        From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
        Sent: Wednesday, October 11, 2000 6:54 AM
        To: Fusebox
        Subject: RE: Application vs. Server Scope


        Looks like you should use a named lock and not a scope lock, as this
has
        nothing to do with variable scopes.

        That is if you just want to block a section of code to one user at a
time do
        this:

        <CFLOCK name="MY_APP_CRITICAL_SECTION1" type="EXCLUSIVE" >

        ... single threaded fuse code...

        </CFLOCK>

        you might also want to look at the docs on CFLOCK about timeout and
        throwontimeout - if this operation is slow.

        HTH,
        Noam
        
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to