Support This Project

Ticket #93 (new defect)

Opened 2 years ago

Last modified 2 years ago

server thread pauses until tcl/perl script execution completes

Reported by: virdiq Assigned to: pollux
Priority: normal Milestone:
Component: server core Version: 0.8.1
Severity: minor Keywords:
Cc:

Description

mathgl reports on IRC that his test tcl/python script (when coded to loop infinitely) will freeze the entire server until the script returns/exits. Users cannot login to the server while the script is executing.

Ideally there should be a toggle (that can be changed for each event in the config file) that allows a script to run synchronously or asynchronously with the client thread.

The server thread (or other client threads) should not lock up during any event script execution.

Attachments

test1.tcl (91 bytes) - added by mathgl on 04/12/07 23:23:55.
test2.tcl (91 bytes) - added by mathgl on 04/12/07 23:24:14.
test1.pl (95 bytes) - added by mathgl on 04/13/07 00:11:31.

Change History

04/12/07 15:36:49 changed by virdiq

  • milestone deleted.

04/12/07 23:23:25 changed by mathgl

I never talk about the perl module, but i will try same tests i made for the tcl module. The python module is a patch not publied and very experimental!

In my conf, i add a site_cmd:

site_testtcl1 = tcl:scripts/test1.tcl
site_testtcl2 = tcl:scripts/test2.tcl

These two scripts make a long loop and push in log "testtcl1 - $x"

My first test was to try these two scripts in the same time ( 2 connections from the same user ) Result they are not executed at the same time.

Logs:

Apr 13 00:16:17 testtcl1 - 9995
Apr 13 00:16:17 testtcl1 - 9996
Apr 13 00:16:17 testtcl1 - 9997
Apr 13 00:16:17 testtcl1 - 9998
Apr 13 00:16:17 testtcl1 - 9999
Apr 13 00:16:17 testtcl2 - 0
Apr 13 00:16:17 testtcl2 - 1
(...)

My second test is to run the script and try to connect to the server. The server start to answer after execution of the script.

That's all for tcl module... now i will try the perl module.

ps : sorry about my poor english.

04/12/07 23:23:55 changed by mathgl

  • attachment test1.tcl added.

04/12/07 23:24:14 changed by mathgl

  • attachment test2.tcl added.

04/13/07 00:10:40 changed by mathgl

Done. Perl make short pause and lets other do what they want ;)

04/13/07 00:11:31 changed by mathgl

  • attachment test1.pl added.

04/21/07 06:57:47 changed by virdiq

  • keywords deleted.