fixup(sound): don't wait audio thread

This commit is contained in:
Dmitriy Pleshevskiy 2022-02-17 19:27:29 +03:00
parent e14a2e9ff3
commit f0dc07faef
1 changed files with 1 additions and 2 deletions

View File

@ -15,7 +15,7 @@ use std::thread;
fn main() {
let (tx, rx) = channel::<sound::Type>();
let boombox = thread::spawn(move || loop {
thread::spawn(move || loop {
rx.recv()
.map_err(From::from)
.and_then(|sound_type| sound::try_play(sound_type.into()))
@ -35,5 +35,4 @@ fn main() {
.configure_env(env::configure)
.launch(initial_state)
.expect("Failed to launch application");
boombox.join().unwrap();
}