[ 
http://dev.sourcefabric.org/browse/LS-495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15485#action_15485
 ] 

David Baelde commented on LS-495:
---------------------------------

This issue is part of a general problem: many operators don't clean up what 
they allocate. It's a good initiative to fix this, and I see in your patch that 
you've addressed playlist() (the one that initially motivated the branch), 
input.harbor() for which the bug was recently mentioned but also several 
others. However, I'm always scared when source.ml is touched, and today there 
are two more reasons to be cautious: we're all extremely busy and we're 
supposed to freeze for a beta2 release. Also note that we haven't finished the 
LS-365 branch, and we should try to avoid a conflict.

Seeing operators such as mix(), which allocates lots of commands, convinces me 
that we need a special mechanism for commands. It may even be in the base 
source class for convenience. But it doesn't need to be as invasive as what you 
did. In particular I'm unconvinced by the namespace management. In your code, 
after register a namespace, you do a #set_id with the namespace. This wasn't 
done in all operators before: is it always a good idea? Also, sources used to 
register the namespace only once, which is fine only if you don't unregister 
it; there seems to be a hole in the code in source.ml regarding this.

I'd feel more comfortable at this point with something simpler and almost 
obviously backward compatible: (1) Leave all namespace and id management 
untouched, unless it is broken or incompatible with unregistering commands and 
namespaces. (2) Create a source#server_add method that can be used in place of 
Server.add, but also register a handle for unregistering the commands 
automatically before #sleep -- namespace unregistering will have to be done 
explicitly in #sleep, however. The #server_add would be called in #wake_up, 
exactly where we currently call Server.add. ((3) Optionally, this may be built 
on top of a general #on_sleep handler system which we could use systematically. 
This may not be so necessary, because we won't use it  in I/O operators, which 
use more precise start/stop mechanisms).

(BTW In fact, I'm not 100% sure that we want/need to unregister namespaces.)

> Deregister telnet commands on source's sleep
> --------------------------------------------
>
>                 Key: LS-495
>                 URL: http://dev.sourcefabric.org/browse/LS-495
>             Project: Liquidsoap
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Romain Beauxis
>            Priority: Important
>
> Server/telnet command needs to be unregistered each time a source is shutdown 
> in order to allow it to be garbage collected (and also to not polute..)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl

Répondre à