0

I want to use ngx.timer.at module to start another thread besides the "main" thread for lua worker process. From the documentation, it turned out the ngx.timer.at module make this pretty easy to achieve. However, when I have this simple code, it seems I did not really run in the backend. I tried log to log file when it starts, but the log information did not appear.

local function _hello(premature)
    ngx.log(ngx.ERR, "Hello world")
    if premature then
        return
    end
end

ngx.timer.at(0, _hello)

"Hello world" did not appear in the log file and I have no idea the new thread was ever been created successfully. Any ideas?

Yongxin Zhang
  • 87
  • 1
  • 3

1 Answers1

0

Turned out this is caused by another problem. Close it here: https://groups.google.com/forum/#!topic/openresty-en/m-5a1Xrpruw

Yongxin Zhang
  • 87
  • 1
  • 3