When a type T implements Sync, it indicates to the compiler that something of this type has no possibility of introducing memory unsafety when used from multiple threads concurrently.
The term "used" should be elaborated: "when used by immutable reference from ..."
It will not occur to a reader that a primitive type implements Sync.
For example, sharing immutable data with an atomic reference count is threadsafe. Rust provides a type like this, Arc<T>, and it implements Sync, so it is safe to share between threads.
This might leave an impression that usize does not implement Sync but when wrapped with Arc, Arc<usize> will have Sync!! (This really was my impression until recently!).
Besides, saying Arc<T> implements Sync itself is incorrect -- it should say "Arc<T> implements Sync if and only if T implements Sync", or better, don't mention Arc at all...
Please word this section more carefully, so that confusion is eliminated in future...
Ref: section 4.6
The term "used" should be elaborated: "when used by immutable reference from ..."
It will not occur to a reader that a primitive type implements
Sync.This might leave an impression that
usizedoes not implementSyncbut when wrapped withArc,Arc<usize>will haveSync!! (This really was my impression until recently!).Besides, saying
Arc<T>implementsSyncitself is incorrect -- it should say "Arc<T>implementsSyncif and only ifTimplementsSync", or better, don't mentionArcat all...Please word this section more carefully, so that confusion is eliminated in future...
Ref: section 4.6