Skip to content

Commit

Permalink
eugh
Browse files Browse the repository at this point in the history
  • Loading branch information
kotauskas committed Jun 12, 2024
1 parent 4183866 commit 0257e92
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/unnamed_pipe/sync/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use std::{io, sync::mpsc, thread};

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

side_b::main(handle)?;
side_b::emain(handle)?;
jh.join().unwrap()
}
4 changes: 3 additions & 1 deletion examples/unnamed_pipe/sync/side_a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{io, os, sync::mpsc};
type Handle = os::windows::io::OwnedHandle;
#[cfg(unix)]
type Handle = os::unix::io::OwnedFd;
pub(super) fn main(handle_sender: mpsc::SyncSender<Handle>) -> io::Result<()> {
pub(crate) fn emain(handle_sender: mpsc::SyncSender<Handle>) -> io::Result<()> {
//}
use interprocess::unnamed_pipe::pipe;
use std::io::{prelude::*, BufReader};
Expand Down Expand Up @@ -33,3 +33,5 @@ pub(super) fn main(handle_sender: mpsc::SyncSender<Handle>) -> io::Result<()> {
//{
Ok(())
} //}
#[allow(dead_code)]
fn main() {}
4 changes: 3 additions & 1 deletion examples/unnamed_pipe/sync/side_b.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{io, os};
type Handle = os::windows::io::OwnedHandle;
#[cfg(unix)]
type Handle = os::unix::io::OwnedFd;
pub(super) fn main(handle: Handle) -> io::Result<()> {
pub(crate) fn emain(handle: Handle) -> io::Result<()> {
//}
use interprocess::unnamed_pipe;
use std::io::prelude::*;
Expand All @@ -20,3 +20,5 @@ pub(super) fn main(handle: Handle) -> io::Result<()> {
//{
Ok(())
} //}
#[allow(dead_code)]
fn main() {}

0 comments on commit 0257e92

Please sign in to comment.