Make DisposalThread reachable (#235)
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 || {
|
||||
|
||||
Reference in New Issue
Block a user