[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: timeouts, select, dispatch
From: |
Alain Magloire |
Subject: |
Re: timeouts, select, dispatch |
Date: |
Fri, 8 Nov 2002 12:48:34 -0500 (EST) |
>
>
> --E39vaYmALEf/7YXx
> Content-Type: text/plain; charset=iso-8859-1
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> > We have put support for non-blocking, it will work correctly
> > for POP3 mailbox.
>
> I can understand it for the case of reading the body of a mail (with
> stream_read), but I would like to avoid blocking during more "atomic"
> operations (like headers fetching). Should I use sth like an alarm to
Not sure what you meant by "atomic" in POP3 there is no way to
get one header(say From: or To:) but to download the entire headers of
the message.
> provide a timeout ? (I would like to avoid threads, as none of our
> other applications require it)
you can set the flag to be MU_STREAM_NONBLOCK when you mailbox_open(..)
it is an or value. But the disavantage is that many calls can
return EAGAIN, and it is up to you to recall the function after
doing a select(stream_get_fd(), ...) on the fd.
I do not like it because something like:
int err = header_get_value("From", ...)
may actually return err == EGAIN since it maps to a call "top" for POP3.
- timeouts, select, dispatch, Frederic Gobry, 2002/11/07
- Re: timeouts, select, dispatch, Alain Magloire, 2002/11/08
- Re: timeouts, select, dispatch, Sergey Poznyakoff, 2002/11/08
- Message not available
- Re: timeouts, select, dispatch, Frederic Gobry, 2002/11/08
- Re: timeouts, select, dispatch,
Alain Magloire <=
- Re: timeouts, select, dispatch, Frederic Gobry, 2002/11/11
- Re: timeouts, select, dispatch, Alain Magloire, 2002/11/11
- Message not available
- Re: timeouts, select, dispatch, Frederic Gobry, 2002/11/11
- Re: timeouts, select, dispatch, Alain Magloire, 2002/11/11