New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-implement a working hot reload? #2
Comments
Think we can use cluster for this:
At worst, if this works, we'll have messages being dropped - which is what we want to happen anyway, as opposed to the client dropping. |
Something like this. if (cluster.isMaster) {
var worker = cluster.fork();
worker.on('message', function (msg) {
ircStream.write(msg);
});
ircStream.on('data', function (msg) {
worker.send(msg);
});
}
else if (cluster.isWorker) {
gu.on('data', function (msg) {
process.send(msg);
});
process.on('message', function(msg) {
gu.write(msg);
});
} And it would need re-starting the worker if it dies. Maybe there's a module that can do process isolated piping like this. |
…t bad - promote process isolation for things like this and expose load and unload - for #2
Hot reload removed from gu in 0.6.0. Should properly try out the process isolation stuff in the future, but for now, at least the garbage that was there is gone. Sorry if it was convenient, but it's not the way to do it. |
Catching the load error is a bad idea
Probably should isolate the gu process somehow.
The text was updated successfully, but these errors were encountered: