openresty / openresty/lua-nginx-module

stop child thread when main request teminated

Open
#1,196 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

hello, i am meeting this problem:

  1. start thread A to pull data from ip1 (eg. use http.lua)
  2. start thread B to pull data from ip2
  3. wait on A and B
  4. main request terminate
  5. the A and B will not stop

how can i stop A and B when main request ternimated ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sequence described: start threads A and B using http.lua, wait on both, and terminate the main request. Trace how request termination is handled for these child threads; done means both stop when the main request terminates, without continuing their pulls from ip1 or ip2.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.