There are 2 things that make this code look buggy:
1. Behavior of select is undefined if either of sets it owns getting modified
2. Even if it's safe on some platforms, it's still possible to call select with
a descriptor which will retire a moment later.
Moreover, in current implementation fd_set can be modified while being
copied via memcpy.
There should be a lock that will protect data.
Best Regards,
Ilya Kulakov
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev