Skip to content

zb,zm,book: Make all ObjectServer methods non-mutable

Ryan Gonzalez requested to merge refi_64/zbus:object-server-no-mut into main

ObjectServer now manages all of its own locking internally, and no mutable instances are required. In addition, the locks are managed such that it's possible to use methods that modify an ObjectServer (such as .at) while references to interfaces are still being held.

Unfortunately, due to the fact that InterfaceDeref/Mut now needs to hold its Arc, some unsafe code had to be added. AFAIK this cannot be worked around without external crates or modifications to async_lock (see discussion in #210 (closed) for more information).

Closes #210 (closed).

Edited by Zeeshan Ali Khan

Merge request reports