Skip to content

Commit c876910

Browse files
committed
Rationale for a child-process
1 parent 5c1ad77 commit c876910

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/helpers/child-process.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
"use strict";
2-
2+
/*
3+
* A new process is spawned with this file for each task.
4+
* Inter process comunication is used to send and receive message from the parent process regarding the task.
5+
* This let us finely control the behavior of the hydration function.
6+
* If it happens to get stuck in a subprocess or in an HTTP blackhole,
7+
* the master process can simply kill the child and resume its normal operation.
8+
* Without the sub-process isolation, we get stuck quite fast and get leaks everywhere.
9+
*/
10+
311
var crypto = require('crypto');
412
var async = require("async");
513
var fs = require('fs');

0 commit comments

Comments
 (0)