aboutsummaryrefslogtreecommitdiffstats
path: root/nihav-core/src
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2019-11-22 12:57:26 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2019-11-22 12:57:26 +0100
commitf20bb38420d25394047d92ceac2ead7c7e5246ed (patch)
tree405749dc74123226cb0956a2e1eaca9dc5dec892 /nihav-core/src
parent16b1399753eb059f8309a328d4cef867cd470150 (diff)
downloadnihav-f20bb38420d25394047d92ceac2ead7c7e5246ed.tar.gz
core/refs: make NABufferRef suitable for passing buffers to threads
Diffstat (limited to 'nihav-core/src')
-rw-r--r--nihav-core/src/refs.rs3
1 files changed, 3 insertions, 0 deletions
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<T> {
ptr: *mut NABufferData<T>,
}
+unsafe impl<T> Sync for NABufferRef<T> {}
+unsafe impl<T> Send for NABufferRef<T> {}
+
impl<T> NABufferRef<T> {
pub fn new(val: T) -> Self {
let bdata = NABufferData::new(val);