Can a plugin have background tasks?


#1

I’m working on a plugin that will need to do some tasks in background (upload files, zip folders, etc).
Can these king of actions be processed in the background so that they don’t block the UI but maybe a nice animation with “please wait” can be displayed instead?


#2

Definitely. There’s support in the Atom and Electron APIs as well as Node. Atom uses the BufferedProcess and BufferedNodeProcess classes as well as Node’s child_process.spawnSync API. You can also use an invisible Electron BrowserWindow to perform background processing.


#3

Good, then it means I should be able to do what I need. Thank you.