Skip to content

Instantly share code, notes, and snippets.

@gterzian
Last active April 8, 2020 14:19
Show Gist options
  • Save gterzian/93abfebe2bfa7543ba04e6957e9a8228 to your computer and use it in GitHub Desktop.
Save gterzian/93abfebe2bfa7543ba04e6957e9a8228 to your computer and use it in GitHub Desktop.
let (script_chan, script_port) = ipc::channel().expect("Pipeline script chan");
let mut unprivileged_pipeline_content = UnprivilegedPipelineContent {
script_port,
// bunch of other stuff needed to start the event-loop...
};
// Spawn the child process.
//
// Yes, that's all there is to it!
if opts::multiprocess() {
let _ = unprivileged_pipeline_content.spawn_multiprocess()?;
} else {
unprivileged_pipeline_content.start_all();
}
// Return an EventLoop to the constellation.
EventLoop::new(script_chan)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment