Intermediate Rust
Q43 / 100

What is the Sync trait?

Correct! Well done.

Incorrect.

The correct answer is B) A marker trait indicating it is safe for multiple threads to hold shared references (&T) to the type simultaneously

B

Correct Answer

A marker trait indicating it is safe for multiple threads to hold shared references (&T) to the type simultaneously

Explanation

T: Sync means &T: Send. Mutex<T> is Sync even if T is not, because it serializes access.

Progress
43/100