mgoodwin wrote:
> [...] actually, I think I remember now - tools like pmchart and
> pmie use multiple contexts, not necessarily all to the same host. So
> if one of those host contexts bounces, they don't all have to hang
> whilst it reconnects/retries [...]
Good point. There is no concept of a timeout for inhdividual PCP
operations, so even a successful but slow connection can tie up
pmchart & pmie. If these more sophisticated clients became
multi-threaded, those issues would become moot (and be replaced by
others).
Alternately, a hypothetical automatic pmReconnectContext effort could
employ a very short timeout, perhaps using libpcp/src/AF.c code.
(Though now that I look at it, onalarm() appears to do lots of
signal-unsafe things, like printing ...). So O_NONBLOCK connect() &
select awhile would probably the way to go.
- FChE
|