Andrew,
Is there any straight forward way of determining that?
The reason I wanted to check for waiting threads was because they indicate a locked resource. Of course, just because there are no threads waiting doesn't mean the resource is available and thanks for pointing that out to me.
But still, since there is one lock per record how would one know if the lock is availble or not without first acquiring it?
I guess now my question would be is there anything in the language itself (or API) that lets you do that? Or can you think (or know) of a way around this problem i.e. determing if the resourse is locked/unlocked without acquiring the lock.
Thanks