It says dillo uses threads for DNS querying and reading local files, and signal driven I/O for TCP connections. When the socket gets ready for transmission, the data is sent using g_io_channel_write. But I can't not find the place where g_io_channel_write is invoked in the code.
Yes, once upon a time it used g_io_channel_write, but not anymore. I'll update this doc ASAP and let you know when its ready.
In previous posts I see "When using threads and mutexes (pthreads), thread scheduling is done by a third thread or by the kernel (depends upon the implementation), and it is preemptive. Now, the address space may be shared, so the need for mutexes arise, and because of both reasons, performance is degraded. Using a pseudo-thread (CCC thread), doesn't require scheduling by an external process or by the kernel. All is done in the same process, but there's no preemption." But I do find a thread is spawned in "a_IO_write_chunk()". Would you please tell me the reason?
Otherwise it wouldn't generate IO signals.
What does pseudo-thread mean?
A non-preemptive thread as those handled by CCC.
I don't think it is really parallel. If there are several connections at the same time, one must wait until another one completes data transfer. assume such a case: one connection is responsible for downloading a big image, and other connections are going to download small images. The former one's G_IO_IN event is triggered first and it begins to download the big image. It will take long for it to complete downloading and other connections have to wait. It's unfair for them though they will cost much less time. I don't know whether I'm right. Must other connections wait until one completes or error occurs?
Is such thread spawned in "a_IO_write_chunk()" pseudo-thread?
No that one is a POSIX thread (or pthread at least ;).
-- Cheers Jorge.-