mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-25 08:39:15 -05:00
add Send impl for SharedRef<BackingStore> (#154)
This commit is contained in:
parent
b7fa3341cb
commit
233160f926
2 changed files with 4 additions and 0 deletions
|
@ -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] {
|
||||
|
|
|
@ -169,6 +169,8 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<T> Send for SharedRef<T> where T: Shared + Send {}
|
||||
|
||||
impl<T> Deref for SharedRef<T>
|
||||
where
|
||||
T: Shared,
|
||||
|
|
Loading…
Reference in a new issue