From 074844463245727ae9c4192f7d0a6ec0a4ae6feb Mon Sep 17 00:00:00 2001 From: JOE1994 Date: Sun, 29 Nov 2020 09:22:10 -0500 Subject: [PATCH] Add T: Send for Send impls of producer/consumer Fix for issue #9 . --- src/mpmc.rs | 8 ++++---- src/mpsc.rs | 6 +++--- src/spmc.rs | 8 ++++---- src/spsc.rs | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mpmc.rs b/src/mpmc.rs index 0045160..d073dee 100644 --- a/src/mpmc.rs +++ b/src/mpmc.rs @@ -34,16 +34,16 @@ pub struct MPMCConsumer> { queue: Arc>>, } -unsafe impl> Send for MPMCConsumer {} -unsafe impl> Sync for MPMCConsumer {} +unsafe impl> Send for MPMCConsumer {} +unsafe impl> Sync for MPMCConsumer {} /// Producer end of the queue. Implements the trait `Producer`. pub struct MPMCProducer> { queue: Arc>>, } -unsafe impl> Send for MPMCProducer {} -unsafe impl> Sync for MPMCProducer {} +unsafe impl> Send for MPMCProducer {} +unsafe impl> Sync for MPMCProducer {} /// Creates a new MPMC queue /// diff --git a/src/mpsc.rs b/src/mpsc.rs index c9d3a8e..b247707 100644 --- a/src/mpsc.rs +++ b/src/mpsc.rs @@ -34,15 +34,15 @@ pub struct MPSCConsumer> { queue: Arc>>, } -unsafe impl> Send for MPSCConsumer {} +unsafe impl> Send for MPSCConsumer {} /// Producer end of the queue. Implements the trait `Producer`. pub struct MPSCProducer> { queue: Arc>>, } -unsafe impl> Send for MPSCProducer {} -unsafe impl> Sync for MPSCProducer {} +unsafe impl> Send for MPSCProducer {} +unsafe impl> Sync for MPSCProducer {} /// Creates a new MPSC queue /// diff --git a/src/spmc.rs b/src/spmc.rs index 1342987..f3c60a5 100644 --- a/src/spmc.rs +++ b/src/spmc.rs @@ -34,16 +34,16 @@ pub struct SPMCConsumer> { queue: Arc>>, } -unsafe impl> Send for SPMCConsumer {} -unsafe impl> Sync for SPMCConsumer {} +unsafe impl> Send for SPMCConsumer {} +unsafe impl> Sync for SPMCConsumer {} /// Producer end of the queue. Implements the trait `Producer`. pub struct SPMCProducer> { queue: Arc>>, } -unsafe impl> Send for SPMCProducer {} -unsafe impl> Sync for SPMCProducer {} +unsafe impl> Send for SPMCProducer {} +unsafe impl> Sync for SPMCProducer {} /// Creates a new SPMC queue /// diff --git a/src/spsc.rs b/src/spsc.rs index d40bba7..a6b26f9 100644 --- a/src/spsc.rs +++ b/src/spsc.rs @@ -32,14 +32,14 @@ pub struct SPSCConsumer> { queue: Arc>>, } -unsafe impl> Send for SPSCConsumer {} +unsafe impl> Send for SPSCConsumer {} /// Producer end of the queue. Implements the trait `Producer`. pub struct SPSCProducer> { queue: Arc>>, } -unsafe impl> Send for SPSCProducer {} +unsafe impl> Send for SPSCProducer {} /// Creates a new SPSC queue ///