Subject: opening a mailbox ina loop event (making it non-BLOCKING)

From: Raul Dias <[email-masked]>
Date: Mon, 13 Aug 2001 12:48:43 -0300

Hi,

Sometimes users have huges mailboxes.  This can take quite a few seconds 
(sometimes more) to open.

It is more common to have it done in a nonthreaded application which will block 
until the mailbox is open.  In this cases the application is usually a GUI or it is 
in a event loop that let the application do lots of work at the same time (e.g. 
several sockets opened for different reasons).

In a GUI application, it will look like as "hanged" to the user until the c-client
finishes opening the mailbox.

In a application with others Network connection, it will make a response time
(while opening a mailbox) really slow and may even cause a timeout.

So here is my question.  How do I use c-client in a NON-BLOCKING way?
is that even possible?

If that isn't I can think in two ways to help that (at least to minimize the problem):

* Enable a callback to be called from c-client during the opening of a mailbox and
  other BLOCKING calls.
  This would let the application check for pending events (like repainting a frozen GUI)
  during the mailbox opening.

* Create a iteration opening function.
  This function would be called in a loop until it flags as DONE (can I say NIL?) each time
  it is called it will make a little work in the job of opening a mailbox.
  The advantage of this approach is that it can be added as an "idle" event to a event loop
  (even in a GUI event loop) and will be interating happly with them.

Of course, this approachs add extra overhead to the proccess and will be a little slower
than the way it is done now, but the result will be satisfatory for all sides.

I guess some other developers in this list have seen this problem too.
How do you resolve it?
Am I missing another kind of approach?

Regards,

Raul Dias
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------