uWS::Loop standalone usage #1705
-
Hi, I'm trying to use a After some tweaking, this works nicely, performant, and very robustly even when hammered, but I still have two questions:
Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Why don't you use a proper thread pool? It's simpler and faster |
Beta Was this translation helpful? Give feedback.
-
Because in that other thread, I want to use asynchronous techniques too, i.e., I need to handle events other than queued tasks (signal handlers, timers, idle handlers, etc.). Therefore, some kind of loop is a must, and I just thought it would be nice and symmetrical to use the same loop tech. Furthermore, libuv's It also happens that I want to use the main thread as the worker. Most thread pools can't do that. Yes, it's a legacy single threaded data-base-centric, forked app that must run tasks of a user-session in tight serialized ACID transactions. Finally, it's one dependency less. 😌 |
Beta Was this translation helpful? Give feedback.
Ok, all apps on the same Loop have the same Date so that's why it is on the Loop. Forgot about that one