On Thursday 28 November 2002 07:58, you wrote:

>
>  From what I've tested, it looks like ns_thread begindetached actually
> grabs available threads from the pool... So using thread 2.5 (once Zoran
> gets it done) to implement thread pools inside AOLserver would be like
> reinventing the wheel.
>

I will try to get the Tcl thread 2.5 extension for Tcl
(and AOLserver) done until end of the year.
It will include the threadpool implementation in both
Tcl and C, a nice abstraction of threads and nsv_* like
interface for shared variables with much larger command
set and internal shared-object handling.
The channel-passing feature (for Tcl8.4+) with both
channel transfer and channel detach/attach functionality
between threads is also included.

The key feature of threadpool implementation is that is
entirely event-loop aware, so application written with
event-loop style wont be blocked while waiting on the
free pool worker or waiting to collect the result of
the posted job. I hope this will simplify much of the
code written initialy with event-loop style and being
ported to the threads paradigm.

The extension will also include an example of a tiny
MT-enabled web-server and general purpose command-line
server, all done in 100-300 lines of Tcl.

Cheers
Zoran

Reply via email to