Skip to content
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

Feature request: allow ngx.sleep to be used everywhere #1730

Open
spacewander opened this issue Jun 15, 2020 · 1 comment · May be fixed by #1759
Open

Feature request: allow ngx.sleep to be used everywhere #1730

spacewander opened this issue Jun 15, 2020 · 1 comment · May be fixed by #1759

Comments

@spacewander
Copy link
Member

For those phases without a request, we can implement ngx.sleep as a wrapper of ngx_msleep.
@doujiang24 @rainingmaster
How about this?

@rainingmaster
Copy link
Member

I think it is OK, I think the requirement exists, and after we tell the user, the user can evaluate the cost by themselves.

spacewander added a commit to spacewander/lua-nginx-module that referenced this issue Jul 28, 2020
Allow ngx.sleep everywhere simplify the application's logic.
Now we don't need to write a fallback if the same function need to be
run in non-yieldable phases.

Close openresty#1730.
spacewander added a commit to spacewander/lua-nginx-module that referenced this issue Jul 28, 2020
Allow ngx.sleep everywhere simplify the application's logic.
Now we don't need to write a fallback if the same function need to be
run in non-yieldable phases.

Close openresty#1730.
spacewander added a commit to spacewander/lua-nginx-module that referenced this issue Jul 29, 2020
Allow ngx.sleep everywhere simplify the application's logic.
Now we don't need to write a fallback if the same function need to be
run in non-yieldable phases.

Close openresty#1730.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants