lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I was thinking about the async request. Copas uses coroutines to handle the IO, so would it be possible to create a special case to Xavante where the [url]handler returns a thread (coroutine) and then Xavante sends it's results (coroutine.resume) to socket's output as long as the thread is not dead? xavante.httpd.send_response() already checks if res[ponse].content is a table or a string.

I think it would be more elegant than spawing threads / forks / whatever -- and more simple too. That would "make my day" :)