[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-devel] Re: Ya know Pan2 is really single threaded, right?
From: |
Duncan |
Subject: |
[Pan-devel] Re: Ya know Pan2 is really single threaded, right? |
Date: |
Sat, 17 Mar 2007 23:25:27 +0000 (UTC) |
User-agent: |
Pan/0.125 (Potzrebie) |
"Calin A. Culianu" <address@hidden> posted
address@hidden, excerpted below, on
Sat, 17 Mar 2007 15:18:13 -0400:
> 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?
It's known and intentional, yes. Older pan (pre 0.9x, coded in C instead
of C++) was indeed multithreaded in its downloading.
I'm not a C/C++ developer myself, and while I know a bit about thread
concurrency issues and believe Charles probably decided it was just
simpler (and still fast enough) to have it all single threaded to avoid
them, I'm not privy to further details. I'd be interested in seeing his
answer, however. =8^)
Meanwhile, I've found it /much/ more my style and much less likely to
stall ongoing downloads if in the binary groups I download everything to
cache, then do local processing as a second round, after everything's
already downloaded. Of course, pan's default 10 MB cache isn't large
enough for this, but that's easily solved by tweaking the setting in
preferences.xml. (As with several "advanced" settings, there's no way to
tweak it in the GUI prefs, only by editing the config files directly.)
As I said, however, I've never seen Charles explain his choice, but
expect I'd learn something about threading as well as about pan seeing
it, so thanks for asking and hope he replies too. =8^)
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
- [Pan-devel] Ya know Pan2 is really single threaded, right?, Calin A. Culianu, 2007/03/17
- [Pan-devel] Re: Ya know Pan2 is really single threaded, right?,
Duncan <=
- Re: [Pan-devel] Ya know Pan2 is really single threaded, right?, Darren Albers, 2007/03/18
- Re: [Pan-devel] Ya know Pan2 is really single threaded, right?, Charles Kerr, 2007/03/23