File: main.rs

package info (click to toggle)
rust-interprocess 2.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,016 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 283 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
mod side_a;
mod side_b;

use std::{io, sync::mpsc, thread};

fn main() -> io::Result<()> {
    let (htx, hrx) = mpsc::sync_channel(1);
    let jh = thread::spawn(move || side_a::emain(htx));
    let handle = hrx.recv().unwrap();

    side_b::emain(handle)?;
    jh.join().unwrap()
}