Thread Safety in Javascript?

后端 未结 5 1375
无人及你
无人及你 2020-12-05 00:33

I have a function called save(), this function gathers up all the inputs on the page, and performs an AJAX call to the server to save the state of the user\'s work.

5条回答
  •  时光取名叫无心
    2020-12-05 00:44

    Looks safe to me. Javascript is single threaded (unless you are using webworkers)

    Its not quite on topic but this post by John Resig covers javascript threading and timers: http://ejohn.org/blog/how-javascript-timers-work/

提交回复
热议问题