[PATCH] rust: maple_tree: implement Send and Sync for MapleTree
Alice Ryhl
aliceryhl at google.com
Tue Sep 8 01:49:25 PDT 2026
On Tue, Sep 8, 2026 at 9:51 AM Eliot Courtney <ecourtney at nvidia.com> wrote:
> +// SAFETY: `&MapleTree<T>` never hands out `&T`; all entry access is serialized
> +// by `ma_lock` or `&mut Guard`, so `T: Send` suffices (`T: Sync` not required).
> +unsafe impl<T: ForeignOwnable + Send> Sync for MapleTree<T> {}
This is true now, but will change if load_rcu() from
https://lore.kernel.org/all/20260116-rcu-box-v1-2-38ebfbcd53f0@google.com/
got merged.
It might be better to just pre-emptively require T: Sync now?
Alice
More information about the maple-tree
mailing list