lua-resty-exec icon indicating copy to clipboard operation
lua-resty-exec copied to clipboard

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

Open daxingshen opened this issue 5 years ago • 0 comments

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

daxingshen avatar Aug 13 '20 10:08 daxingshen