Sync

The Sync trait has a similar type signature:

pub unsafe auto trait Sync { }

This trait signifies that types that implement this trait are safe to be shared between threads. If something is Sync then a reference to it in other words, &T is Send. This means that we can pass references to it to many threads.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset