Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 416c7329 authored by Alice Ryhl's avatar Alice Ryhl Committed by Automerger Merge Worker
Browse files

Merge "Mention in safety comment that Parcel can't be Sync." into main am:...

Merge "Mention in safety comment that Parcel can't be Sync." into main am: 34115507 am: bd4cd563 am: b1f74181

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2799654



Change-Id: I0ec4fd105f9eb5b8d29d868b26b3650c864df8f8
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a963b6c0 b1f74181
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -54,6 +54,10 @@ pub struct Parcel {


/// Safety: This type guarantees that it owns the AParcel and that all access to
/// Safety: This type guarantees that it owns the AParcel and that all access to
/// the AParcel happens through the Parcel, so it is ok to send across threads.
/// the AParcel happens through the Parcel, so it is ok to send across threads.
///
/// It would not be okay to implement Sync, because that would allow you to call
/// the reading methods from several threads in parallel, which would be a data
/// race on the cursor position inside the AParcel.
unsafe impl Send for Parcel {}
unsafe impl Send for Parcel {}


/// Container for a message (data and object references) that can be sent
/// Container for a message (data and object references) that can be sent