PDA

View Full Version : [TCL] Script making io freeze.


JoC
05-03-2004, 12:53 AM
Hi all!
I am playing around with TCL and I have a problem. I have a script that is run every 5th minute with the ioFTPD sheduler. Problem is that this script sometimes can take 10-15 seconds to execute, and it seems like io freezes until the script is done. Have I done a misstake or is it like this. Can I maybe use some internal timer in the TCL script instead of the sheduler? Any help, code examples or links woul be very much appreciated.

darkone
05-03-2004, 01:12 AM
Make sure you have enough worker threads to handle blocking itcl scripts. For performance reasons, itcl only switches thread to mode where it's allowed to block (another thread is spawned, if neccessary to handle pending work requests in-time), when outputting directly to socket) I'm planning to add tcl command that allows scripter to set thread to this mode, when he expects execution of script to take longer than 500ms.

JoC
05-03-2004, 01:57 AM
Thanks for your fast answer. Do I need to restart io when I have incresed the number of workers threads or will a rehash do the trick?

darkone
05-03-2004, 02:31 AM
Change in number of threads requires restart atm.