Re: select or signal - which one to choose?
From: Joe Beanfish (joebeanfish_at_nospam.duh)
Date: 08/09/04
- Previous message: Phlip: "Re: [C+Image Magick] Request for examples"
- In reply to: Igor Gorbounov: "Re: select or signal - which one to choose?"
- Next in thread: Igor Gorbounov: "Re: select or signal - which one to choose?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 09 Aug 2004 13:29:51 -0400
On Mon, 09 Aug 2004 10:22:55 +0400, Igor Gorbounov <igorbounov@topazelectro.ru> wrote:
> **** Post for FREE via your newsreader at post.usenet.com ****
>
> Joe Beanfish wrote:
> > [...]
> >
> > Since you're already using select I'd be inclined to use that for
> > the serial portion too. Should be much simpler than trying to
> > have both methods.
> There is an unpleasant problem: for polling comport I need a timeout
> (about 20 mc in case some of the controllers would fail, then the
> app has to call the other controller in queue), but in a listening
> clients request module there is an infinite timeout (NULL timeout
> in select's last parameter). So I have to use 2 selects to solve
> the task.
Why? Use one select with timeout for both. If the timeout
occurs adjust your queue and restart the select, which you're
going to do anyhow, otherwise handle the ready channel(s).
- Previous message: Phlip: "Re: [C+Image Magick] Request for examples"
- In reply to: Igor Gorbounov: "Re: select or signal - which one to choose?"
- Next in thread: Igor Gorbounov: "Re: select or signal - which one to choose?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|