From: Kostya Shishkov Date: Fri, 22 Nov 2019 11:57:26 +0000 (+0100) Subject: core/refs: make NABufferRef suitable for passing buffers to threads X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=f20bb38420d25394047d92ceac2ead7c7e5246ed core/refs: make NABufferRef suitable for passing buffers to threads --- diff --git a/nihav-core/src/refs.rs b/nihav-core/src/refs.rs index 4c2e290..292c888 100644 --- a/nihav-core/src/refs.rs +++ b/nihav-core/src/refs.rs @@ -35,6 +35,9 @@ pub struct NABufferRef { ptr: *mut NABufferData, } +unsafe impl Sync for NABufferRef {} +unsafe impl Send for NABufferRef {} + impl NABufferRef { pub fn new(val: T) -> Self { let bdata = NABufferData::new(val);