javascript internals: how events are implemented?

蓝咒 提交于 2019-12-05 05:41:55
jfriend00

Read this post about the javascript event queue and see if it answers most of your question. There will be a native OS thread that handles interfacing with actual OS events (mouse events, keyboard events, timer events, network I/O events, etc...) and those are then fed into the JS queue where the JS engine can further dispatch them to Javascript code. How many separate threads there are at the OS level is implementation specific and likely does vary with the implementation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!