What will happen if 100 threads will send commands at the same time and 
those commands will be more complicated, not just return?

Main thread will serialize them, i guess.
Does not it seems like global lock in Lua?
Will it scale the way you want it to scale?

Vasiljevic Zoran wrote:
> On 10.05.2008, at 17:50, Vasiljevic Zoran wrote:
> 
>>  I think
>> it is the most one can do with Tcl.
> 
> 
> Hm ... not that bad consider the
> trivialiy of the example.
> 
> package req Thread
> set tp [tpool::create -initcmd {
>      proc sayhello args {
>          return hello-[thread::id]
>      }
> }]
> 
> proc unknown args {
>      global tp
>      set id [tpool::post $tp $args]
>      tpool::wait $tp $id
>      tpool::get  $tp $id
> }
> 
> % time {sayhello} 100
> 48 microseconds per iteration
> % sayhello
> hello-tid0xb0103000
> % thread::id
> tid0xa0111fa0
> 
> As you see, unknown triggers the sayhello that is declared
> on pool threads, but not in my thread. And the execution
> time is not really bad. And this is just generic stuff.
> Done in C really tight, I can go make that 1/5 most probably.
> 
> 
> 
> 
> -------------------------------------------------------------------------
> 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
> 

-- 
Vlad Seryakov
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/

-------------------------------------------------------------------------
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