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