select() errors and AnyEvent::Loop
Marc Lehmann
schmorp at schmorp.de
Thu Jul 1 05:37:17 CEST 2021
> Currently if that select() gets EBADF the program tight-loops indefinitely.
I am confused still - are you talking about a specific program that uses
AnyEvent, or AnyEvent::Loop? The latter certainly does not behave the way
you describe.
Most programs with this kind of behaviour recover more or less instantly,
although AnyEvent::Loop and AnyEvent make no guarantee whatsoever.
> Is there some circumstance where that’s somehow desirable?
You have to ask the application writer - AnyEvent only does as
instructed. Using AnyEvent in this way is certainly not _supported_,
but nevertheless, if the application has verified that this is correct
behaviour, I don't care, and, as a quality of implementation issue,
AnyEvent::Loop favours best effort over crashing.
If it's not correct behaviour for the program, the program needs to be
fixed, there is nothing AnyEvent can do about it.
> “Best effort” would, I’d think, be to throw in this case so that the problem is more easily identified.
I don't see how "throwing" would make the problem more easily identified.
Certainly, "throwing" is unlikely to be correct for _any_ program?
> We can certainly patch locally and likely will. It would just be nice for it to be upstream, too.
I might not understand your problem, but your analysis suggests your
understanding of the code is wrong, since your claims are wrong - there is
nothing in AnyEvent that needs patching, or can be patched, it's the code
causing this condition that needs to be patched, if any.
Of course, you are free to locally patch whatever you want, but patching
things based on not understanding how the code works sounds like a bad
idea.
Certainly it's not how this upstream handles things, otherwise we'd
be full of hacks and broken code, and we strive for a high quality
implementation :)
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list