openresty / openresty/lua-nginx-module
[feature or help] `run_worker_thread` has too strong limitation
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
As document says, we are not allowed to use any ngx_lua feature in run_worker_thread calls.
I guess it's because thread has no request context to do those calls, but is it really necessary to forbid all ngx.* APIs?
For example:
- string manipulate functions, including regex/encode/decode;
- nginx enviroment, like
ngx.get_phase()config.* ngx.log()- shared memory
ngx.shared
Are those calls allowed but not documented, or for some reason they're not supported, or they can be and will be supported?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the documented restrictions for run_worker_thread and the ngx.* APIs listed in the issue, including ngx.log(), ngx.shared, ngx.get_phase(), and config.*. Determine which APIs lack request context and define the supported behavior or documentation needed for each category.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100