Yesterday evening I added support for POP boxes to tinymail. It’s a little bit unstable at this moment as the CamelPOP3Folder does not support summaries and the way tinymail handles IMAP was using this summary support in Camel. So some things had to change and I’ll have to do some more testing.
During the last few days I also added support for creating messages and mime parts in tinymail. I already promised my girlfriend Tinne that she will receive the first message sent by tinymail. But first things first: I need to implement some infrastructure for sending E-mails.
I also asked the GNOME administrators to add a tinymail product in bugzilla. And to create a tinymail-devel mailing list. But that mailing list ain’t created yet. Anyway, there’s some interesting people interested in joining tinymail development. That’s all I’m saying about it.
Probably because I’m using camel differently than Evolution, I’m finding some funny camel bugs. I’ve also started studying camel in depth as there’s some things about camel you really need to know that aren’t documented.
And cause of that, as usual, I want to start changing everything. Like the usage of threads in camel. I have this funny idea that a library shouldn’t try to implement much threading details by itself. In stead, camel implements a non portable wrapper and uses stuff like pthread_cancel. Therefore I hereby declare tor a hero for making that actually work on Win32.
I would someday like to replace that EThread stuff in Camel with something like asyncworker as as far as I can see, it’s basically the same as the E_THREAD_QUEUE type being used in CamelSession. The difference is that asyncworker uses the abstract and portable GThread type and has support for canceling at by-the-programmer defined cancellation points without using pthread_cancel.
The main problem with pthread_cancel is that it can cancel on various POSIX functions. Somebody on IRC told me it will only cancel on specifically pthread_trycancel if you have some default switch turned on, but the man page on pthread cancellation isn’t telling me that.
Anyway … I basically avoid using pthread_cancel. Asyncworker doesn’t use it. Search for the protected _o_async_worker_try_cancel method to learn how I implemented it (it’s using the gmainloop to recover from a cancellation).