Songbird: Tokio 1.0 (#36)

Migrates to the new version of tokio, requiring channel and sleep changes in a few locations. Additionally points to the in-tree v0.3 version of twilight.
This commit is contained in:
Kyle Simpson
2021-01-06 13:01:14 +00:00
committed by GitHub
parent d42e09f72b
commit f05b7414a0
14 changed files with 57 additions and 49 deletions

View File

@@ -1,7 +1,7 @@
use super::*;
use crate::events::EventData;
use flume::Sender;
use std::time::Duration;
use tokio::sync::oneshot::Sender as OneshotSender;
/// A request from external code using a [`TrackHandle`] to modify
/// or act upon an [`Track`] object.
@@ -27,7 +27,7 @@ pub enum TrackCommand {
/// Run some closure on this track, with direct access to the core object.
Do(Box<dyn FnOnce(&mut Track) + Send + Sync + 'static>),
/// Request a read-only view of this track's state.
Request(OneshotSender<Box<TrackState>>),
Request(Sender<Box<TrackState>>),
/// Change the loop count/strategy of this track.
Loop(LoopState),
/// Prompts a track's input to become live and usable, if it is not already.