Re: [AOLSERVER] mutex try lock?

2007-02-23 Thread John Buckman
On Feb 23, 2007, at 8:31 AM, John Buckman wrote: Should also get around to implementing ns_mutex eval $mutex $script--acquire the mutex, evaluate the script, release the mutex. Catch any Tcl errors and re-throw them. This guarantees that the mutex is unlocked, which avoids the trivial

Re: [AOLSERVER] mutex try lock?

2007-02-23 Thread Tom Jackson
Dossy, The problem described is exactly what ns_cond solves. But what is the problem? Executing code withing a mutex lock which takes meaningful time. Instead with ns_cond, you use a mutex just so you can grab a condition variable, or at least try to grab it, and if not go to sleep and wait.

Re: [AOLSERVER] mutex try lock?

2007-02-23 Thread John Buckman
So, the question becomes: is it better to add -timeout time to all the blocking subcommands, or to add ns_mutex trylock? In theory, -timeout 0 should perform the trylock equivalent. I'd vote for -timeout on all lock requests, as that way I get both the see if lock is available

Re: [AOLSERVER] mutex try lock?

2007-02-23 Thread Michael Andrews
That is how the ns_cache stuff works in 4.5. There is a maxwait flag that can be set when the cache is created. If one thread has the lock (updating the cache) the others will only wait a certain amount of time before timing out - good deadlock prevention. M On Feb 23, 2007, at 10:06

[AOLSERVER] Easy Question

2007-02-23 Thread Ian Harding
I hope. I am trying to build 4.5.0 on plain vanilla Fedora Core 6. First I had to make the utils/*.tcl executable, and add the shebang line for my tcl install. I assume that should not have happened and may give you a clue what I did wrong. nsthread_libinit.o: In function `_init':

Re: [AOLSERVER] Easy Question

2007-02-23 Thread Dossy Shiobara
On 2007.02.23, Ian Harding [EMAIL PROTECTED] wrote: nsthread_libinit.o: In function `_init': /usr/local/aolserver-4.5.0/include/nslibinit.c:42: multiple definition of `_init' /usr/lib/gcc/i386-redhat-linux/4.1.1/../../../crti.o:(.init+0x0): first defined here collect2: ld returned 1 exit

Re: [AOLSERVER] Easy Question

2007-02-23 Thread Ian Harding
That rings a bell. Thanks! On 2/23/07, Dossy Shiobara [EMAIL PROTECTED] wrote: On 2007.02.23, Ian Harding [EMAIL PROTECTED] wrote: nsthread_libinit.o: In function `_init': /usr/local/aolserver-4.5.0/include/nslibinit.c:42: multiple definition of `_init'

Re: [AOLSERVER] Easy Question

2007-02-23 Thread Juan José del Río
El Fri, 23 Feb 2007 11:02:06 -0800 , Ian Harding [EMAIL PROTECTED] escribió: I hope. I am trying to build 4.5.0 on plain vanilla Fedora Core 6. First I had to make the utils/*.tcl executable, and add the shebang line for my tcl install. I assume that should not have happened and may give