Hi, Johnny Depp <[email protected]> writes:
> [...code...] This code looks okay to me. > My problem is this: When I use this code in two separate simple applications, > the above code > works. However, when I move the server into a larger application with > multiple threads, it is > starting to behave randomly: it works in some cases, but it mostly doesn't. > The poller does > detect anything on wait. This raises a possible flag. Is the PULL (server) socket being used from different threads? If so, you'll need to constrain its entire lifetime to a single thread. Or, if you need thread-safety you may switch to SERVER/CLIENT (draft sockets). With your code as shown I think you may need to simply change the socket types from PUSH/PULL to CLIENT/SERVER to test this (and maybe rebuild with "draft" sockets if they aren't in your libzmq and libczmq builds already). Cheers! -Brett.
signature.asc
Description: PGP signature
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
