Is JavaScript guaranteed to be single-threaded?

后端 未结 12 1681
遇见更好的自我
遇见更好的自我 2020-11-21 06:38

JavaScript is known to be single-threaded in all modern browser implementations, but is that specified in any standard or is it just by tradition? Is it totally safe to assu

12条回答
  •  旧时难觅i
    2020-11-21 06:51

    Well, Chrome is multiprocess, and I think every process deals with its own Javascript code, but as far as the code knows, it is "single-threaded".

    There is no support whatsoever in Javascript for multi-threading, at least not explicitly, so it does not make a difference.

提交回复
热议问题