Skip to content

Commit beedf80

Browse files
committed
Add Send and Sync to FlipHistogram and FlipPool (Fixes #2)
1 parent 329f894 commit beedf80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nv-flip/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@ pub struct FlipHistogram<'a> {
343343
inner: *mut nv_flip_sys::FlipImageHistogramRef,
344344
_phantom: PhantomData<&'a ()>,
345345
}
346+
347+
unsafe impl Send for FlipHistogram<'_> {}
348+
unsafe impl Sync for FlipHistogram<'_> {}
349+
346350
impl<'a> FlipHistogram<'a> {
347351
/// Returns the difference between the maximum and minimum bucket values.
348352
pub fn bucket_size(&self) -> usize {
@@ -463,6 +467,9 @@ pub struct FlipPool {
463467
values_added: usize,
464468
}
465469

470+
unsafe impl Send for FlipPool {}
471+
unsafe impl Sync for FlipPool {}
472+
466473
impl FlipPool {
467474
/// Creates a new pool with 100 buckets.
468475
pub fn new() -> Self {

0 commit comments

Comments
 (0)