summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2025-12-16 09:09:01 +0900
committerBoqun Feng <boqun.feng@gmail.com>2026-01-09 19:01:40 +0800
commit8a581130b1cbc17c702298b8325e3df98c792760 (patch)
tree500118cd4368db1c5a366aa4cedd4309c1dffe9a /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent106ab474e5a711ea08e0908a42cfa89d691e57ad (diff)
rust: sync: set_once: Implement Send and Sync
Implement Send and Sync for SetOnce<T> to allow it to be used across thread boundaries. Send: SetOnce<T> can be transferred across threads when T: Send, as the contained value is also transferred and will be dropped on the destination thread. Sync: SetOnce<T> can be shared across threads when T: Sync, as as_ref() provides shared references &T and atomic operations ensure proper synchronization. Since the inner T may be dropped on any thread, we also require T: Send. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Link: https://patch.msgid.link/20251216000901.221375-1-fujita.tomonori@gmail.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions