Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Semaphores in Version 4.25
Thu, Feb 22 2007 12:39 PMPermanent Link

Gordon Turner
In my app I use table semaphores to track how many users are currently
accessing the data files as part of my licensing scheme.  It is my
understanding that a semaphore lock is automatically unlocked when the
connection to the table is lost (like when the application terminates -
normally or abnormally).

Yet, in CS mode, it appears that the semaphore locks are not
automatically unlocked when the session ends abnormally, and not even
when disconnected sessions are removed, but only when the server is
restarted.  Is this correct?

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Fri, Feb 23 2007 7:53 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< In my app I use table semaphores to track how many users are currently
accessing the data files as part of my licensing scheme.  It is my
understanding that a semaphore lock is automatically unlocked when the
connection to the table is lost (like when the application terminates -
normally or abnormally).

Yet, in CS mode, it appears that the semaphore locks are not automatically
unlocked when the session ends abnormally, and not even when disconnected
sessions are removed, but only when the server is estarted.  Is this
correct? >>

No.  Whenever a dead session is cleaned up by the server, all resources
(i.e. locks, etc.) owned by that session are freed, including semaphore
locks.

Are you sure that the session isn't still present on the database server ?
It will simply show up as a disconnected session until it is cleaned up by
the database server according to the dead session expiration time and max
dead session count parameters.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image