Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Background processes in electron

Darcy Cox edited this page Apr 3, 2019 · 3 revisions

Background processes in electron

This page contains a short guide intended to give developers a head start on creating background tasks in electron.

Context

In electron, there are two types of processes: the main process, and the renderer process.

The main process is the entry point of the program and it performs any work to do with opening new windows (web pages) and managing each one's lifecylce.

A renderer process runs within a "web page", which in electron is just a window. Each renderer process manages everything GUI-related for its associated window and any function calls made by the GUI are run in this process. A consequence of this is that if a long running task is run in a renderer process, its associated window will freeze and become unresponsive. So if you have a long running task, you should delegate it to a background process.

To read more about electron's process architecture, see here

Clone this wiki locally