1
0
Fork 0
forked from wry/wry

backend: implement output transactions

This commit is contained in:
Julian Orth 2025-07-10 11:17:34 +02:00
parent f8d03c25a9
commit 7ab99bb840
25 changed files with 2712 additions and 1460 deletions

View file

@ -17,12 +17,26 @@ pub struct ExtSessionLockV1 {
pub client: Rc<Client>,
pub tracker: Tracker<Self>,
pub did_lock: bool,
pub awaiting_locked: Cell<bool>,
pub finished: Cell<bool>,
pub version: Version,
}
impl ExtSessionLockV1 {
pub fn send_locked(&self) {
pub fn check_locked(&self) {
if !self.awaiting_locked.get() {
return;
}
for output in self.client.state.outputs.lock().values() {
if !output.connector.connector.effectively_locked() {
return;
}
}
self.send_locked();
self.awaiting_locked.set(false);
}
fn send_locked(&self) {
self.client.event(Locked { self_id: self.id })
}