I was thinking that the additional method would take both a socket and an int 
to make sure that the socket its removing is correct, since it is possible that 
unregister was already called and another socket registered in its place.
As a general issue - is it a problem that registering/unregistering is not 
thread safe? I am building something like a reactor and trying to use the same 
thread that is doing the polling and dispatch to also receive commands that 
affect the poller state (like registering/unregistering). Does that make sense 
to you guys?


On Feb 25, 2011, at 1:14 PM, gonzalo diethelm wrote:

>> In that case I would suggest adding a new method (unregisterIndex or
>> something like that) instead of adding a new argument to keep the
>> backward compatibility.
> 
> The current unregister() method takes a Socket, we can just overload it with 
> another version that takes an int.
> 
> And one of the two versions should simply delegate onto the other one.
> 
> -- 
> Gonzalo Diethelm
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to