Spool thread can be a replica of driver thread, it will do the same as driver and then pass Sock to the conn thread. So making it C-based is not that hard and still it will be fast and small.

Plus, upload statistics now will be handled in the spool thread, not driver thread, so no overhead and slowdown.

So we read up to maxreradahead, then queue it into spooling thread and spooling thread will give it to conn thread. Spooling thread will use same Sock/Driver structures, actually Sock will not see any differences between running in driver thread or spooling thread.

I can try to provide test of using spooling thread along with driver thread today if i will have time.

Zoran Vasiljevic wrote:

Am 03.01.2006 um 11:21 schrieb Andrew Piskorski:

Hm, does Tcl support asynchronous (non-blocking) IO for both network
sockets and local files?  Tcl has 'fconfigure -blocking 0' of course,
but I don't know for sure whether that really does what you want for
this application.  If Tcl DOES support it adequately, then all the
previous questions about how to do cross-platform asynchronous IO from
C vanish, which is a nice bonus.


Tcl does this properly by implementing non-blocking IO (O_NONBLOCK or O_NDELAY)
and adding their own event-loop processing salt. This works for both  files
and sockets.

The truble is: you need a fully loaded Tcl for that. But we do have it
anyways. If we restrict that across limited number of spooling threads,
the overhead might not be large. Normally I'd start with spoolthread- per-cpu
but the infrastructure must be made so that it allows several spooling
threads to gain from multiple-cpu's in modern boxes.

Zoran



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


Reply via email to