-
Notifications
You must be signed in to change notification settings - Fork 130
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
not work with thread #23
Comments
I think working well in linux is just coincidence. wslay has no mutex inside it, and using wslay_event_context_ptr from multiple threads is unsafe, and must be avoided. |
This example is just trying to show that the asynchronous call to write in recv_callback does not send a packet at OSX. Such copy data and the use of global variables in this example, just lazy : ) |
hello , I meed the same problem, I want to send lots of data, but wslay_event_queue_msg seems to work only in main thread. Is there any idea? |
wslay_event_context must not be used by multiple thread at the same time. If you'd like to use it from multiple thread, use mutex around the calls. |
I use wslay with thread pool in c, and I got a problem。
To simplify the problem, as the fork-echoserv example:
use thread, package can't be send.
。。。。。。
I just find this problem only in OSX, it's work in Linux
The text was updated successfully, but these errors were encountered: