Does the electron framework allow multi-threading through web workers?

前端 未结 4 743
天命终不由人
天命终不由人 2020-12-30 02:22

I am having a hard time googling how I would do multi-threading if I made an electron app. Would it be with web workers?

4条回答
  •  失恋的感觉
    2020-12-30 03:06

    According to the Multithreading docs:

    With Web Workers, it is possible to run JavaScript in OS-level threads.

    All built-in modules of Node are supported, however none of Electron's built-in modules or modules with native bindings should be used in Web Workers as they are not designed to be thread-safe.

提交回复
热议问题