lex_hello worked for a second just now

this is just a backup however
This commit is contained in:
2025-02-02 10:20:03 +01:00
parent 2b79e96dc9
commit 1556d54226
45 changed files with 646 additions and 371 deletions

View File

@@ -3,7 +3,6 @@ use std::rc::Rc;
use async_once_cell::OnceCell;
use derive_destructure::destructure;
use futures::task::LocalSpawnExt;
use orchid_base::error::OrcErrv;
use orchid_base::location::Pos;
use orchid_base::reqnot::Requester;
@@ -34,10 +33,8 @@ impl fmt::Debug for ExprHandle {
impl Drop for ExprHandle {
fn drop(&mut self) {
let notif = api::Release(self.ctx.id, self.tk);
let SysCtx { reqnot, spawner, logger, .. } = self.ctx.clone();
if let Err(e) = spawner.spawn_local(async move { reqnot.notify(notif).await }) {
writeln!(logger, "Failed to schedule notification about resource release: {e}");
}
let SysCtx { reqnot, spawner, .. } = self.ctx.clone();
spawner(Box::pin(async move { reqnot.notify(notif).await }))
}
}