• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to compute on a background thread or process?

Participant ,
Sep 19, 2017 Sep 19, 2017

Copy link to clipboard

Copied

Hey everyone,

I would like to put a computational intensive task off the main thread so the UI of our HTML5 extension is not blocked. Javascript WebWorkers do not work because I need access to the file system using node.js. WebWorkers do not support node.js. I can imagine a couple of possible solutions:

1. Node.js allows to create child processes which would basically launch a new Node.js instance. child_process.fork() looks like exactly what I want. I allows to have back and forth communication. BUT it is not working. The child_process is exiting with code 255

Is child_process.fork() supported?

2. I have not tried or researched for this one. Is it possible to launch a secondary invisible panel extension and then send data to it and receive progress back?

Does one of you guys have a better "Background Thread" solution?

Thanks,

Thomas

TOPICS
SDK

Views

269

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation