Async tasks

This commit is contained in:
Luke D. Jones
2022-06-07 00:54:33 +12:00
parent e493113450
commit af216ee08c
7 changed files with 150 additions and 107 deletions

View File

@@ -34,7 +34,7 @@ The task trait:
pub struct CtrlAnimeTask(Arc<Mutex<CtrlAnime>>);
impl crate::CtrlTask for CtrlAnimeTask {
fn do_task(&self) -> Result<(), RogError> {
fn create_task(&self, executor: &mut Executor) -> Result<(), RogError> {
if let Ok(lock) = self.inner.try_lock() {
<some action>
}