Skip to content

zb: add Connection::monitor_activity()

Marc-André Lureau requested to merge elmarco/zbus:event-listen into main

This new method allows caller to sleep and wake up on connection activity. This is mostly meant to implement timeout on inactivity for services, ex:

    loop {
        if !connection.monitor_activity().wait_timeout(Duration::from_secs(10)) {
            break;
        }
    }
Edited by Marc-André Lureau

Merge request reports

Loading