projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
core/refs: make NABufferRef suitable for passing buffers to threads
[nihav.git]
/
nihav-core
/
src
/
refs.rs
diff --git
a/nihav-core/src/refs.rs
b/nihav-core/src/refs.rs
index 4c2e2903a0f3e11b4a02a093f93d158398ff6656..292c8887d4cf376c3413d0faf42e37e10cd10d6c 100644
(file)
--- 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);