Comments (5)
This is not a complete program and it's not a proper bug report. You can't just dump your project and expect someone else to solve your problems, you need to specify an isolated problem with the library, not just "my project is not working, fix it".
from uwebsockets.
it crash in this library clearly.
from uwebsockets.
Any single threaded library will crash if misused from different threads, or if passed invalid references.
There's an arrogance I don't need. But I can say from your fraction of program that you probably mix threads for HttpWorker (the name implies multithreaded use).
But since you only posted a fraction of your program, nobody on Earth will know or want to know.
This is not a usable bug report
from uwebsockets.
Thank you for pointing out this issue. It is indeed possible that multiple threads are calling the same instance's app_->publish("broadcast", message.dump(), uWS::TEXT)
. However, even after adding locks to protect this call, the problem persists. Could you advise on how best to utilize your internal synchronization mechanisms in this situation? I have tried reviewing the examples and documentation, but haven't found a clear approach. Any additional resources you could provide would be greatly appreciated.
from uwebsockets.
A lock doesn't do anything for a library that is single-threaded. The only function you can call from many threads is Loop::defer it is mentioned in readmore manual.
from uwebsockets.
Related Issues (20)
- Underscore HTTP headers are still messed up
- http post application/octet-stream large body get fail HOT 1
- uWS::HttpRequest setHeaders HOT 1
- dear sir, a stupid question, how to compile on linux(debian/ ubuntu)? HOT 4
- How do I set up development environment HOT 1
- uWS::Loop::defer causes crashes (SIGSEGV) HOT 3
- Kernel load balancing HOT 1
- C++ 20 Module support HOT 2
- benchmark HOT 1
- UB in sending long messages HOT 5
- A crash occurred when the client closed the connection HOT 3
- Pressure test HOT 1
- Random crashes HOT 9
- Specify QoS for MQTT syntax HOT 1
- Unable to fail a request without triggering a CORS error HOT 5
- CLOSE_WAIT question HOT 8
- Segmentation fault when returning SSL_CTX of the app HOT 4
- Use AddressSanitizer before posting crash issues
- is it support client in 2024?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uwebsockets.