[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-devel] Ya know Pan2 is really single threaded, right?
From: |
Calin A. Culianu |
Subject: |
[Pan-devel] Ya know Pan2 is really single threaded, right? |
Date: |
Sat, 17 Mar 2007 15:18:13 -0400 (EDT) |
Why does pan2 ever create a threadpool? It's actually single-threaded!
I discovered this because UUDecoding attachements led to pan2 stalling
completely (the UI was frozen too -- the whole app was stuck inside
UUDecodeFile()). This is because pan2 does all its task processing from
the main thread's idle loop!
The other 4 threads that are created are only briefly used to create a
socket connection to the nntp server, then the actual handshaking and
logging-in is handled from the main thread's idle loop!
Furthermore, any and all nntp stuff happens in the main thread. Sure,
there are 4 task contexts that keep getting shuffled around, but basically
only 1 task at a time ever runs, and it runs in the main thread.
Meanwhile, you have this perfectly lovely thread pool sitting there
twiddling its thumbs.
Is this intentional?
I think I know how to fix this.
Are you guys open to accepting patches?
My gripe with this for the most part is that UUDecode() of large binaries
(sometimes a single attachment can be 50mb) stalls the whole app and leads
to poor network utilization overall.
-Calin