-
Hi, I have a single threaded uWebSockets server running that puts incoming messages into a per-connection message queue. The application itself is multi-threaded, but sending is sequential and receiving is sequential as per client connection. I can't really say that it's a server problem or a client problem. Is there anything that I can do to analyse the root cause, or am I using uWebSockets incorrectly? thx Michi |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
It sounds like you are assuming every connection would be isolated with no side effects other than for itself. That's not the case and I'm almost certain you're not doing things correctly. There is a user manual you can read |
Beta Was this translation helpful? Give feedback.
-
The library is single threaded. Meaning, you can absolutely not mix threads. The only function that can be called from any thread is defer |
Beta Was this translation helpful? Give feedback.
-
Alex, sorry for my ignorance but I want to make sure I understand this correctly. sorry to have bothered you again |
Beta Was this translation helpful? Give feedback.
-
Nope. That definitely will wreck havoc. The entire App and Loop has to be entirely isolated to only one thread. There are Discussions about this you can read about, it is a common question so I have closed this one here. |
Beta Was this translation helpful? Give feedback.
Nope. That definitely will wreck havoc. The entire App and Loop has to be entirely isolated to only one thread. There are Discussions about this you can read about, it is a common question so I have closed this one here.