Skip to content

Commit

Permalink
Impl Send & Sync for JoinHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
Stjepan Glavina committed Jul 26, 2018
1 parent 45b48b9 commit 89a8162
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libstd/thread/mod.rs
Expand Up @@ -1276,6 +1276,9 @@ impl<T> JoinInner<T> {
#[stable(feature = "rust1", since = "1.0.0")]
pub struct JoinHandle<T>(JoinInner<T>);

unsafe impl<T> Send for JoinHandle<T> {}
unsafe impl<T> Sync for JoinHandle<T> {}

impl<T> JoinHandle<T> {
/// Extracts a handle to the underlying thread.
///
Expand Down

0 comments on commit 89a8162

Please sign in to comment.