Checking in...



Hi all,

I had to take a sudden (and longer than expected) break from work on
balsa.  I finished some of my work on one project and have a bit more time
to spend on Balsa... (sorry)

I have on quick thought on SMTP and multi-threaded checking.  I think that
it doesn't have to be terribly complicated, and I'll offer this:  if,
Hector, you want to come up with 3 routines -- one that opens a connection
with the SMTP server, one that both sends a single message and deletes the
temporary file, etc., and finally one that closes the SMTP connection I'll
handle all of the threading work.

Multi-threaded code is definitely more difficult to debug (which I'm
willing to do) but it doesn't have to be much more complicated than other
schemes to make balsa responsive during checking.

I do think, though, that some documentation about how the threading is
designed, what functions it uses, and why it's setup that way might help,
and I'll see what I can do over the next couple of weeks. For the mail
sending code, though, it's just a matter of keeping a singly-linked list
of structs that refer to outgoing messages and launching a thread to work
through the list and send the messages.  The only tricky part is making
sure that there isn't a conflict between the two processes adding to and
removing from the list.

Incidentally, I know, Hector, that you were wanting to move the deletion
of the message struct and temp files to the main thread, but it seems to
me, the more that I think about it, that unless we're running balsa on a
386 with PIO1 drives and sending war and peace, it shouldn't be terribly
noticeable to the server and it should, in fact, improve the
'responsiveness' of balsa for the average user to have the thread handle
this on a per-message basis.  (If we do it the 'easy' way and find that it
is, actually, a problem we can move that to the main thread later.)

David

PS  Provided I can make some headway my next project will be to implement
some kind of searching capability that may or may not provide the basis
for some filtering code.  (Unless, that is, someone's already doing this.)




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]