Skip to content

Commit

Permalink
Make DisposalThread reachable (#235)
Browse files Browse the repository at this point in the history
The `Config` object provided to `Call`s and `Driver`s allows setting a `DisposalThread`, but since it is unreachable from outside the crate, the only way to properly set it is using a `Songbird` instance, which may not be adequate for all use cases. This PR just makes `DisposalThread` reachable from the outside.
  • Loading branch information
AlvaroMS25 authored Mar 30, 2024
1 parent a5d9b58 commit 1d5b259
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ use core::{
use flume::{r#async::RecvFut, SendError, Sender};
#[cfg(feature = "builtin-queue")]
use std::time::Duration;
#[allow(unused_imports)]
pub use tasks::disposal::DisposalThread;
use tasks::message::CoreMessage;
use tracing::instrument;

Expand Down
1 change: 1 addition & 0 deletions src/driver/tasks/disposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ impl Default for DisposalThread {
}

impl DisposalThread {
#[must_use]
pub fn run() -> Self {
let (mix_tx, mix_rx) = flume::unbounded();
std::thread::spawn(move || {
Expand Down

0 comments on commit 1d5b259

Please sign in to comment.