From f20bb38420d25394047d92ceac2ead7c7e5246ed Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 22 Nov 2019 12:57:26 +0100 Subject: [PATCH] core/refs: make NABufferRef suitable for passing buffers to threads --- nihav-core/src/refs.rs | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5