pub struct AudioWorkerHandle { /* private fields */ }Expand description
Clonable handle to a shared audio worker.
Multiple Audio handles can share one worker by cloning
the handle and passing it via AudioConfig.
Implementations§
Source§impl AudioWorkerHandle
impl AudioWorkerHandle
Sourcepub fn new() -> Self
pub fn new() -> Self
Spawn a new shared worker with a fresh orphan cancel token.
Convenience for tests and standalone usage. Production paths use
AudioWorkerHandle::with_cancel with a child of the player
master — see kithara-play/README.md “Cancel Hierarchy”.
Sourcepub fn with_cancel(cancel: CancellationToken) -> Self
pub fn with_cancel(cancel: CancellationToken) -> Self
Spawn a new shared worker thread bound to the given cancel token
and return a handle. Production callers (e.g. EngineImpl) pass a
child of the player master so worker shutdown participates in the
unified cancel hierarchy.
Trait Implementations§
Source§impl Clone for AudioWorkerHandle
impl Clone for AudioWorkerHandle
Auto Trait Implementations§
impl Freeze for AudioWorkerHandle
impl RefUnwindSafe for AudioWorkerHandle
impl Send for AudioWorkerHandle
impl Sync for AudioWorkerHandle
impl Unpin for AudioWorkerHandle
impl UnsafeUnpin for AudioWorkerHandle
impl UnwindSafe for AudioWorkerHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more