On Sun, 2008-08-10 at 11:20 +0200, Dirk Meyer wrote: > first of all, I guess you have a script testing all this. Can you add > it to the base/test directory please.
It's pretty horrific. I'll update base/test/asynctest.py to verify the new api. > Now that I see the code, I'm not sure it is a good idea to call > __inprogress__ in the coroutine. As we talked about, you can not > "return" a Signal anymore. And the new inprogress() function gives me > anything I wanted with InProgressCallback and the signal support. Well, we did talk about that, and we agreed that being able to return a signal is not immediately necessary. You realize that coroutines are unable to return InProgress objects, right? :) > I propose to remove the sepcial handling again. So > > | yield signals > > will "return" the signal. If you want to wait use > > | yield inprogress(signal) I guess I'm ok with this. > It is just one word more on the caller side and IMHO it makes the code > cleaner because the caller states that this line does not return but > uses an InProgress. Example: > > | if beaconquery.not_finished(): > | yield beaconquery > > What happens? Does it return the unfinished query or does it wait? You > can not be sure unless you look at the code of beaconquery. On the > other hand if you see > > | if beaconquery.not_finished(): > | yield inprogress(beaconquery) > > you know what happens. I'm not sure I understand this. In the first code, you ask does it return an unfinished query or does it wait? Well, assuming beaconquery is an InProgress object, that depends -- is beaconquery finished or not? If not, it will wait. And it will wait anyway in the second example too, because inprogress(beaconquery)==beaconquery. So I don't quite understand this suggestion. ------------------------------------------------------------------------- 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 Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel