From 233160f926ec7473e8e1f284fabafbc9adbc8440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 30 Dec 2019 22:48:08 +0100 Subject: [PATCH] add Send impl for SharedRef (#154) --- src/array_buffer.rs | 2 ++ src/support.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/array_buffer.rs b/src/array_buffer.rs index e435dcb2..c5b2de5e 100644 --- a/src/array_buffer.rs +++ b/src/array_buffer.rs @@ -99,6 +99,8 @@ impl Delete for Allocator { #[repr(C)] pub struct BackingStore([usize; 6]); +unsafe impl Send for BackingStore {} + impl BackingStore { /// Returns a rust u8 slice with a lifetime equal to the lifetime of the BackingStore. pub fn data_bytes<'a>(&'a mut self) -> &'a mut [u8] { diff --git a/src/support.rs b/src/support.rs index fe402ea2..6bd668d2 100644 --- a/src/support.rs +++ b/src/support.rs @@ -169,6 +169,8 @@ where } } +unsafe impl Send for SharedRef where T: Shared + Send {} + impl Deref for SharedRef where T: Shared,