On Wednesday 01 October 2003 12:20, you wrote:
> Hi all,
>
> I don't know how AS is working internally with the TCL interpreters.
> Is it correct is I say the following ? :
>
> A TCL interpreter is created at startup. It reads the config file. Then
> this interpreter becomes the "master TCL interp" that stays here until the
> process shutdown.
>
> Every time a thread is created, a TCL Interp is created and "derived" from
> the master TCL interp (that is all the user commands are recreated in this
> TCL Inter).
> If this is true, so the master TCL Interp is never used by any thread to
> process any page. Is that right ? Is yes, can we anyway access to this TCL
> master interpreter using C functions ?
>
> Thanks for any help !
>
> Why this question ? Because I remember a discussion about shared channels
> across threads (using ns_chan or my nssharechannel module).
> It looks like this sharing is working, but may not be entirely safe. If
> this "master TCL interp" exists, we could use it to create and register the
> channel to this master Interp and use shared channels in a safer manner.
>
> The cons is that we cannot use standard channel commands, and create new
> tcl commands to create/read/write/delete channels as those channels are not
> using the current interp... Perhaps this is not a so good idea :-(
>

I won't go very deeply in answering all of the mechanics of
the AS-Tcl integration. Just the bottom line, about the primary
question: sharing Tcl channels.

In the current AS version (as in CVS) the ns_chan command
is properly implemented. You can use this command to create
shared detached channels and transfer them between
threads/interps in a very convenient and simple matter.
I even posted the docs to Daniel concerning this command so
expect this to be included in the AS documentation, sooner/later.

BTW, documentation... I'd be very happy to see some community
help concerning this issue. There are still some undocumented
commands and we'd appreciate if somebody provides some/any input.

Cheers,
Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of 
your email blank.

Reply via email to