Forum OpenACS Q&A: Re: carnage blender is live on aolserver 4 beta5

Collapse
Posted by Andrew Piskorski on
Jonathan, the following Tcl code works just fine:
set lock [ns_mutex create] 
ns_mutex lock $lock 
ns_mutex destroy $lock 
ns_log Notice "atp: Mutex destroyed: '$lock'" 
Therefore, I don't think this issue is nearly as serious as I first feared. The proper thing to do is have your Tcl code always lock the mutex before destroying it. That will guarantee you never have any problems.

Now, it might well be a very good idea to change AOLserver such that if you forgeting to lock the mutex could not possibly cause AOLserver to crash. However, I think this is a nice-to-have rather than release critical feature.