Closed ppolyanskiyy closed 1 year ago
Means send is called from one thread, but not the same where context and socket is created
sockets cannot be referenced from multiple threads
What do you mean by referenced? I create socket in one thread, but use it (e.g. call receive ) in second and no more threads are involved. Even if i put creation of socket into the same thread, the issue still reproduces.
@ppolyanskiyy could you make a new issue then, without a repro that doesn't involve using a socket from a different thread that the one in which it was created?
Issue description
I receive a few duplicated messages instead of all different. The PUSH socket sends 5 different messages of the same size one by one. The PULL socket receives exactly 5 messages but some of them are duplicated, and some of them are not received.
I attach the file with most important part of wrapper for libzmq. ZmqWrapper.zip
Environment
Windows 10 Enterprise. Version 22H2. OS build 19045.2728
Minimal test code / Steps to reproduce the issue
Important note: the context is create from one thread but send and receive is called from the different. (Means send is called from one thread, but not the same where context and socket is created, and receive from it's own)
What's the actual result? (include assertion message & call stack if applicable)
Receive same number of messages, but some of the are duplicated
What's the expected result?
Receive all different messages