Skip to content

Commit

Permalink
chore: callback demo lock conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
SSebo committed Aug 10, 2022
1 parent d709f6c commit 2b240c6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion socketio/examples/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,14 @@ fn main() {

// use the socket

socket.disconnect().expect("Disconnect failed")
let join_handle = std::thread::spawn(move || loop {
println!("{:?} will emit", std::time::Instant::now());
let r = socket.emit("message", json!("test"));
println!("{:?} did emit {:?} ", std::time::Instant::now(), r);
std::thread::sleep(std::time::Duration::from_millis(10));
});

let _ = join_handle.join();

// socket.disconnect().expect("Disconnect failed")
}

0 comments on commit 2b240c6

Please sign in to comment.