On Sat, Apr 26, 2008 at 06:48:55AM +0200, Marc Lehmann <[EMAIL PROTECTED]> wrote: > Well, can't say thereis much demand for it, but if you cna give me a pointer > on these things in the docs I can probably come up with one before the next > release:
Looking at Stem::Event, which hopefully is the right place to look, I cna come up with soem answres and some more refined questions :) Here is a new question: - How do I select a specific event loop backend to be used? > - does stem provide something to catch signals synchronously? doesn't seem to be documented, I assume so. > - how can I do one iteration of the event loop? This is important Interestingly, the manpage for "Stem::Event # event loop" doesn't mention any way to start said event loop. The source code has init_loop, start_loop and, interestingly, stop_loop. Does that mena I have to initialsie the event loop myself? Is initialising it multiple times a problem (obviously, code using anyevent can't be bothered to implement workarounds for stem, so if that were a problem, stem couldn't be used by default. Thats not too bad, however, as it would sitll be used if the main program uses stem). > - how do I register a callback to be called when an fh or fd becomes > "readable" or "writable"? This is also not documented. All it says is: This class creates an event that will trigger a callback whenever its file descriptor has data to be read. [...] It doesn't say how to pass "its dile descriptor", or wether it also works with file handles. > - how can I register a relative timer? Solved :) Whats missing is how I cancel that time, does it automatically cancel itself when the returned object gets forgotten by the calling code? > - are there any limitations, for example, what happens when I register > two read watchers for one fh (or fd)? The answre seems to be: stem needs the same workaround as Tk, unless I overlooked some internal layer. > - how about child status changes or exits? Doesn't seem to be supported, so AnyEvent will fall back to its own code (there is nothing wrong with that, POE is much worse, as its code is broken but insists on reaping children so one cnanot even use one's own implementation). > - how does stem handle time jumps, if at all? Can't really find anything here either, I guess changing the clock requires a restart. > - are it's timers based on absolute or wallclock time or relative/monotonic > time? Seems to be absolute time. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] -=====/_/_//_/\_,_/ /_/\_\