Ya know Pan2 is really single threaded, right?
"Calin A. Culianu" <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.pan.devel |
|---|---|
| Message-ID | <[email protected]> |
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