08-10-2023 04:17 AM
Hi,
when I use Mozilla Thunderbird on Windows 10, and try to view an email, the program freezes up repeatedly whilst it downloads other emails. This has to be because it is one task or thread doing everything, and it cant be everywhere. The remedy is to have 1 task for say reading an email, 1 task downloads new emails, etc, then you can happily read an email without it freezing up repeatedly for ages. Each task should "lock" data it is modifying or adding to, to avoid "incoherency". But another task can do stuff in parallel where the data doesnt overlap. Whilst a task modifies data, that data is incoherent ie neither here nor there until the modifications are complete, eg some data might need a checksum, but whilst modifying data, the checksum will be wrong until the last moment, and that task or thread would lock out other tasks or threads.
If I read an email, that doesnt overlap with other emails being downloaded, so the scrolling shouldnt freeze up like it does currently! And even worse, bringing the main program window to the front also freezes up!
it is really annoying, to the extent that I may eventually find another email host which does this properly.
That is my only criticism of the program, all other features seem good.
With *nix its just a matter of using fork() and guarding shared data appropriately, I forget the MO used on *nix to guard data, and the version I use is on Windows. I know how to program this kind of thing on AmigaOS where you use semaphores. With AmigaOS you launch a task as a brand new program, and sharing of data is externalised or done via communicating with a task that managages some data.
In general, you have 2 kinds of guarding of data: shared read access, and exclusive write access. Tasks or threads will queue up on some data, a write request locks out all others, a read request only locks out write requests.
I expected Mozilla to do this kind of thing correctly! eg Mozilla Firebird does this kind of thing properly, where each tab is in parallel, and you can have parallel downloads, the Thunderbird team should ask the Firefox team how to do this!
it would be the same program, but you'd need to subtly rejig the source code, its a metalevel modification of the source.