Re: - IMAP, POP problem ? -



> >They are needed to prevent other problems, but in some cases they do cause
the
> >main thread to block... I am looking into ways to improve things.... (the
> >problem is that libmutt was never intended to be used multithreaded...)
> >
> 
> Is it possible to lock mutt for different types of activities ? 
> Since , at least the first point (from above) worked before, it should mean
that mutt is able to handle POP3 and IMAP in the same time. The same applies for
reading one mailbox while receiving mail into another one - for the moment, if
I'm receiving mail from POP3 and want to browse one mailbox  no way !! - which
was possible with 0.9.2
> 
> I saw there is a global mutt_lock, wouldn't it be better to have a
mutt_imap_lock, mutt_local_lock and mutt_pop_lock.
> 
> 

Unfortunately mutt uses several global variables (eg in dotlock code) which
are
shared between different places (eg POP and local mailboxes..). Basically mutt
wasn't written with thread safety in mind - someone would have to go through
all of libmutt and make sure there was no places where globals are used etc...
quite a task...

The fact that it worked before without the locks is mostly due to luck, the
things that can go wrong are unlikely to go wrong, but they can happen, so
mutt
must be locked..

We survived until recently without using the gdk lock either - then we started
noticing strange X errors due to multiple threads making gdk calls
simultaneously.

Ian




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