Hi Howard, Lua support has been discontinued in favor of upcoming Javascript server-side support.
But to answer your question, I believe you should look at http://lua-users.org/wiki/ThreadsTutorial On Thu, Jul 10, 2014 at 2:04 PM, Howard Cai <[email protected]> wrote: > I use mongoose + lua, I create test.lp file like this: > > ----------------------------------- > HTTP/1.0 200 OK > Content-Type: text/html > > <? > --Some code to write file or sqlite > local file = io.open("C:\\1.txt","a") > file:write("test\n") > file:close() > ?> > --------------------------------- > > If many connections access test.lp in one second, how to add lock to my > code? > > -- > You received this message because you are subscribed to the Google Groups > "mongoose-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mongoose-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "mongoose-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/d/optout.
