For John. Just curious as to what problem the "try lock" was needed for.

- n

On 2/22/07, Tom Jackson <[EMAIL PROTECTED]> wrote:

Nathan,

Was this a question for me, or John?

tom jackson

On Thursday 22 February 2007 08:18, Nathan Folkman wrote:
> Just curious, but what's the use case where you would use something like
> this?
>
> - n
>
> On 2/22/07, Tom Jackson <[EMAIL PROTECTED]> wrote:
> > I have some example code of condition wait:
> >
> >
> >
http://rmadilo.com/m2/servers/rmadilo/modules/tcl/twt/packages/db/tcl/dat
> >asource-procs.tcl
> >
> > The procs lock, unlock, wait, popPool, etc. Wrap the ideas up pretty
> > easily,
> >
> > but the question is what happens when you code times out waiting for a
> > resource?
> >
> > tom jackson
> >
> > On Thursday 22 February 2007 07:09, John Buckman wrote:
> > > 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.
> >
> > --
> > 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.


--
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.




--
Nathan Folkman
[EMAIL PROTECTED]


--
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