On Fri, May 20, 2011 at 10:23 AM, Martin Lucina <[email protected]> wrote:
> So what is the "best practice" then? > > Or are you just trying to put people off from migrating sockets as much as > possible? I.e. the "If you don't know what this means, don't use it" > approach? You missed the key story here, which was that people were systematically passing sockets between threads, and doing it wrong, and getting asserts. This was happening 2-3 times a week. So we looked at this thread spawning pattern and decided it was better to pass contexts but not sockets, and then we changed the Guide to explain that. This piece of the doc should have been fixed too but escaped. Basically, passing sockets around is for system-level work only, i.e. language bindings that have to do this, not application level work. Undocumenting this and providing alternate patterns that were more robust did in fact reduce the number of accidents to close to zero. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
