-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Libuv event loop #2396
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
Comments
Try using uv.run(), it might solve your problem. |
Hi @DuskRavenVII I'd hope it would, but it either blocks ( |
I'd like to replace what is primarily a file i/o HTTP interface (with some extra parts, which is why the regular sendfile() and friends functionality doesn't work), but it appears there's no non-blocking file i/o within either lua itself, or in lua-nginx-module, which is what led me down the path of attempting to use libuv. Is this a pattern you've seen before? |
Use uv.run() in a separate thread and make sure that uv.run("nowait") is continuously checking for I/O operations. |
I'm wondering if there is a way to use libuv in the background. I've tried the following in init_worker_by_file, and it appears that while the timers fire and the thread is started, subsequent requests never get control:
The text was updated successfully, but these errors were encountered: