On Thu, Dec 2, 2010 at 11:56 PM, Grzegorz Nosek <r...@localdomain.pl> wrote:
> W dniu 03.12.2010 01:22, Roger Hoover pisze:
>>
>> What if the existing reference counter both closes the socket and
>> removes the reference?  I think that would make the code much simpler.
>
> I'm not sure it will work either, though I don't know if the problem may
> ever occur in supervisord in real life. If sockets are only closed just
> before destruction, it probably isn't an issue and would indeed be the
> simplest.
>
> If you get a ManagedSocket to close the socket and unregister itself, you
> may end up with two ManagedSockets for the same url -- one that is kept
> alive by a SocketManager but not present in SocketManager.sockets and a new
> one, created by _another_ SocketManager and put into .sockets.
>
> Does that make sense or am I just overly paranoid?

I think it makes sense.  We want to keep a registry (the SocketManager
class) of all managed sockets.  This same registry can be used to do
error checking to make sure that a config doesn't have duplicate
sockets without the reuse_socket flag.

>
> Best regards,
>  Grzegorz Nosek
>
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to