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

prog('bash', '-c',...) will block #18

Open
daxingshen opened this issue Aug 13, 2020 · 0 comments
Open

prog('bash', '-c',...) will block #18

daxingshen opened this issue Aug 13, 2020 · 0 comments

Comments

@daxingshen
Copy link

daxingshen commented Aug 13, 2020

prog('bash', '-c',...) will block
i spawn 10 prog to execute a curl command use ngx.thread.spawn. i had tried follow two way:

 for i=1, 10 do
    prog('curl', '-L', '-s', 'www.xxx.com' )
end
 for i=1, 10 do
    prog('bash', '-c', 'curl -L -s www.xxx.com' )
end

it spend seconds mostly same as one curl when use first way. it work as my expected. but when i use the second way, it seems execute one by one. it spend 10 times senconds. why this, 3q

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

No branches or pull requests

1 participant