Jason Tackaberry wrote:
> Well, we did talk about that, and we agreed that being able to return a
> signal is not immediately necessary.

Yes, but maybe for other objects. See below.

> You realize that coroutines are unable to return InProgress objects,
> right? :)

Yes.

>> 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.

No, I mean beaconquery is a beacon.Query object. So it is no
InProgresss object. You can not know if beaconquery is returned
because it is no InProgresss object or if it will wait because it has
an __inprogress__ function. You have to look at the code. If we move
the inprogress() call out of coroutine again, it will become clear:

yield beaconquery returns the object
yield inprogress(beaconquery) waits


Does it makes sense?


Dischi

-- 
Half of the troubles of this life can be traced to saying yes too
quickly and not saying no soon enough. - Josh Billings

-------------------------------------------------------------------------
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

Reply via email to