On Sat, May 10, 2008 at 2:27 PM, Vasiljevic Zoran <[EMAIL PROTECTED]> wrote:
>
> On 09.05.2008, at 20:44, Vasiljevic Zoran wrote:
>
>> What MIGHT work is kind of this: create some numbers of
>> fully loaded interps, each sitting in its own thread.
>> A compute-farm, so to say. Then every other thread just
>> creates a slave interp in one of those and runs all its
>> scripts in his private slave in one of those parked threads
>> in the compute-farm, using some kind of message passing.
>> The slaves have all the commands aliased into the main
>> one. Not sure what would happen with uplevels and upvars
>> here (need to think) but this is roughly what I'm
>> contemplating about now.
>
> Upvars/Uplevels will not work. No way.
>
>> So when a thread exits, its
>> thin-slave is just deleted completely. And created it is
>> also fast. Just alias all commands from the master. Not
>> sure about the global variables... this is still open.
>
> No access to variables...
> So: no generic solution as I was looking after.
>


Undocumented:

    generic/tclResolve.c: Tcl_AddInterpResolvers()



You could probably even fake-up a solution using a single interp with
your own name resolvers. Before you start executing the code for a
single client, set a 'context' global which your resolver routines
will use to keep state variables separate for each client.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to