On Dienstag 07 Oktober 2008, Jason Tackaberry wrote: > On Mon, 2008-10-06 at 20:42 +0200, Hans Meine wrote: > > Now that I read it again, let me try to understand it: > > Dischi explained much of this, but let me be a bit more pedantic and > dissect some of your statements:
Thanks to both of you; your complete walk-through helped me understanding what
happens a lot. Hopefully this public discussion will make things clear for
other people, too. I wonder if kaa.base's async stuff is (or could be) used
other contexts (other python projects), too. Maybe one should announce it
e.g. on python-dev?
> Right, if main() was not decorated as a coroutine then it would not be
> reentered.
>
> > and this actually runs from kaa.main.run(),
>
> It probably does, yes. It would only get reentered via the mainloop iff
> kaa.beacon.query() returned an _un_finished InProgress, as per my
> explanation above.
And as I saw with your bugfix of beacon-search, kaa.main.run() otherwise hangs
in a no-op mainloop. Not very nice, is it?
Maybe a nice fix could be to have a @mainloop decorator which wraps a
(generator) function in the appropriate if __name__ == "__main__"...
boilerplate code that also checks if main().finished?
--
Ciao, / / .o.
/--/ ..o
/ / ANS ooo
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Freevo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
