File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -639,7 +639,6 @@ where
639639/// queued events, such as delivery notifications. The thread will be
640640/// automatically stopped when the producer is dropped.
641641#[ must_use = "The threaded producer will stop immediately if unused" ]
642- #[ derive( Clone ) ]
643642pub struct ThreadedProducer < C , Part : Partitioner = NoCustomPartitioner >
644643where
645644 C : ProducerContext < Part > + ' static ,
@@ -772,6 +771,16 @@ where
772771 }
773772}
774773
774+ impl < C : ProducerContext + ' static > Clone for ThreadedProducer < C > {
775+ fn clone ( & self ) -> Self {
776+ Self {
777+ producer : Arc :: clone ( & self . producer ) ,
778+ should_stop : Arc :: clone ( & self . should_stop ) ,
779+ handle : self . handle . clone ( ) ,
780+ }
781+ }
782+ }
783+
775784impl < C , Part > Drop for ThreadedProducer < C , Part >
776785where
777786 Part : Partitioner ,
You can’t perform that action at this time.
0 commit comments