why Javascript SetTimeout() is not multithreaded

前端 未结 8 520
生来不讨喜
生来不讨喜 2020-12-20 13:49

I have a test:

Html:

Empty
Empty

js:

var s1 =         


        
8条回答
  •  猫巷女王i
    2020-12-20 14:41

    Mozilla does support multi-threading in Javascript - as long as you don't want to do UI work from multiple threads. The early versions of my Remove Duplicate Messages (Alternatve) exentsion were multi-threaded.

    See my own bug page regarding this issue in my extension, or better still, this page about using worker threads in Mozilla. eicto, you could very well implement your code using a background thread.

提交回复
热议问题