Dirk Meyer wrote:
> Dirk Meyer wrote:
>> kaa.popcorn is no Application, the video and audio player _have_ a
>> popcorn instance but do not inherit from it. So application resume is
>> only needed for ressource handling. So I vote for suspend and resume
>> without prefix. But we need an extra function can_suspend to check all
>> blocking ressource if it would be possible to suspend all. So what
>> about extending get_resources: it returns {} if everything is ok, a
>> dict which object hold resources if suspend is working for all and
>> False if at least one can't be suspended.
> 
> An even better idea: let get_resources do this. If you call
> get_resources you get either True (feel free to use it), False (not
> possible) or an InProgress object (it is possible, InProgress will be
> called when all resources are free to use). Remeber the objects
> suspended in the ressource handler. Now free_resources can free the
> resources and resume all suspended applications. We need an extra
> parameter for free_resources to make clear if we free because we are
> done (resume the others) or because we need to because of a
> get_resources (do not resume).

No I think it is better if the caller of get_resources can decide what 
to do when a resource is occupied. For example the joystick plugin. I 
would prefer if it stops when some one else is using the joystick 
resource and print an error in the log. Since the joystick plugin would 
not release the joystick until the end of freevo.
In addition if we would need to store the suspended application this can 
get complicated if i want to suspend the movie player and this one has 
suspended the audio player. (I know this is a rare case).

But i like the idea of checking if it is possible to release a resource 
and if not give an appropriate return message.


Mathias

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to