File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -87,12 +87,20 @@ unsafe impl<'a> UriBound for Log<'a> {
87
87
}
88
88
89
89
unsafe impl < ' a > Feature for Log < ' a > {
90
- // Note: this feature can be used in any threading class and doesn't seems to have thready
91
- // unsafty, but you are supposed to only use the trace log in rt context
92
- unsafe fn from_feature_ptr ( feature : * const c_void , _class : ThreadingClass ) -> Option < Self > {
90
+ // Note: this feature can be used in any threading class but:
91
+ // * i have a doubt about it's thread safety, can we assume the host provide this thread safety
92
+ // since this feature can be used anywhere ?.
93
+ // * i shouldn't be used in context where rt is a concern, that mean is audiothreadclass in
94
+ // practice, but it's acceptable to use it for debugging purpose
95
+ // So, at this time, i just giving access to it instanciation class
96
+ unsafe fn from_feature_ptr ( feature : * const c_void , class : ThreadingClass ) -> Option < Self > {
97
+ if class == ThreadingClass :: Instantiation {
93
98
( feature as * const lv2_sys:: LV2_Log_Log )
94
99
. as_ref ( )
95
100
. map ( |internal| Self { internal } )
101
+ } else {
102
+ panic ! ( "The log feature is only allowed in the indtantiation threading class" ) ;
103
+ }
96
104
}
97
105
}
98
106
You can’t perform that action at this time.
0 commit comments