File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -639,6 +639,9 @@ impl<T> Drop for Event<T> {
639
639
/// kind of notification was delivered.
640
640
pub struct EventListener < T = ( ) > ( Listener < T , Arc < Inner < T > > > ) ;
641
641
642
+ unsafe impl < T : Send > Send for EventListener < T > { }
643
+ unsafe impl < T : Send > Sync for EventListener < T > { }
644
+
642
645
impl < T > fmt:: Debug for EventListener < T > {
643
646
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
644
647
f. write_str ( "EventListener { .. }" )
@@ -1132,3 +1135,13 @@ mod sync {
1132
1135
}
1133
1136
}
1134
1137
}
1138
+
1139
+ fn __test_send_and_sync ( ) {
1140
+ fn _assert_send < T : Send > ( ) { }
1141
+ fn _assert_sync < T : Sync > ( ) { }
1142
+
1143
+ _assert_send :: < Event < ( ) > > ( ) ;
1144
+ _assert_sync :: < Event < ( ) > > ( ) ;
1145
+ _assert_send :: < EventListener < ( ) > > ( ) ;
1146
+ _assert_sync :: < EventListener < ( ) > > ( ) ;
1147
+ }
You can’t perform that action at this time.
0 commit comments