Ok, Another patch fixing some condition signalling bugs. There exists couple of possibilities, where a condition signal might be sent before the other thread has had enough time to actually call cond_signal_wait() or cond_signal_timedwait() and therefore the waiting thread might miss the signal completely. The use of "msg_status"-variable makes sure that this cannot happen anymore (as well as making sure that cond_signal() is ever called only while keeping the mutex locked).
Unfortunately, I was unable to test this patch completely (more or less the program shutdown case), because the evolution v1.4.4 I have seems to hang the multisync's evolution-plugin, until I kill the "wombat" process ... (have to check out what's the problem with wombat, as it tends to leak memory as well) Regards, Tomi Orava
multisync-locking.patch
Description: Binary data
