I'm looking to have mutexes with timeouts, and I see support in the C code for this but none carried over to Tcl.

In the C code, there's a Ns_MutexTryLock() function, but no tcl function for calling it.

Ns_MutexLock calls Ns_MutexTryLock() and there appears to be timeout support:
    if (!NsLockTry(mutexPtr->lock)) {
        return NS_TIMEOUT;
    }

but I don't see any way of setting the mutex timeout seconds.

It's trivially simple to modify NsTclMutexObjCmd (in tclthread.c) to support "ns_mutex try" and I'm wondering if there's a reason this hasn't been done.

-john


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to