-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
child thread, zsocket_set_linger assert error,when main thread call zctx_destroy (&ctx); #199
Comments
Could you provide more information about the assertion that fails? |
sorry,i don't know how to modify the style to make the code clear.
|
I've not tried yet to reproduce this, but try removing the On Wed, Jun 26, 2013 at 4:02 PM, balanceren notifications@github.comwrote:
|
In first version,I didn't add the zsocket_destroy() ,it is the same error |
I debug the zmq when it term, and find the bug, but I don't know how to fix it. when the child thread get the term cmd,and
the assert condition is rc and the errno,
but, I found the _errno() has different address, so It is the reason why errno != ETERM. |
Can you get more information?
Thanks On Thu, Jun 27, 2013 at 4:22 AM, balanceren notifications@github.comwrote:
|
there is the code in my previous reply, you can test it. if the _errno() got same address, the code is ok. I compile the zmq to static lib and link to my app, and then the _errno() got the same address. if I compile the zmq to dll in windows, the _errno() got different address |
I can't test the code, don't have a Windows box, and the problem doesn't What I know is that on Windows, errno is per-thread; this is why _errno() Could you try to get me the information I asked for, then I'll try to see On Fri, Jun 28, 2013 at 8:47 AM, balanceren notifications@github.comwrote:
|
the errno is per dll, I suggest the zcmq use a self errno to manage the errno status. |
OK, thanks for explaining it. I've pushed a patch that should fix this: #202 |
Problem: errno is DLL specific on Windows (#199)
in Windows platform.
when main thread call zctx_destroy (&ctx), the child thread created by zthread_fork, cause assert false in zsocket_set_linger();
I am not clear the zthread lib, so I add
void * child = zthread_fork(ctx, client_task, "child1");
......
zstr_send(child,"DELETE"); //the client_task handle the DELETE cmd
char * str = zstr_recv(child);
free(str);
zctx_destroy (&ctx);
use zstr_recv to wait the client_task finish.
work like join.
is there a fun works like zthread_join.
The text was updated successfully, but these errors were encountered: