File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed
Sources/CrowdinSDK/CrowdinSDK/Localization/Provider Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ protocol LocalizationDataSourceProtocol {
1717class AnyLocalizationDataSource < T> : LocalizationDataSourceProtocol {
1818 typealias Values = T
1919
20- private let accessQueue = DispatchQueue ( label: " com.crowdin.AnyLocalizationDataSource.accessQueue " , attributes: . concurrent)
21-
2220 private let _findKey : ( String ) -> String ?
2321 private let _findValues : ( String , String ) -> [ Any ] ?
2422 private let _update : ( T ) -> Void
@@ -29,27 +27,11 @@ class AnyLocalizationDataSource<T>: LocalizationDataSourceProtocol {
2927 self . _update = dataSource. update
3028 }
3129
32- func findKey( for string: String ) -> String ? {
33- var result : String ?
34- accessQueue. sync {
35- result = _findKey ( string)
36- }
37- return result
38- }
30+ func findKey( for string: String ) -> String ? { _findKey ( string) }
3931
40- func findValues( for string: String , with format: String ) -> [ Any ] ? {
41- var result : [ Any ] ?
42- accessQueue. sync {
43- result = _findValues ( string, format)
44- }
45- return result
46- }
32+ func findValues( for string: String , with format: String ) -> [ Any ] ? { _findValues ( string, format) }
4733
48- func update( with values: T ) {
49- accessQueue. async ( flags: . barrier) {
50- self . _update ( values)
51- }
52- }
34+ func update( with values: T ) { _update ( values) }
5335}
5436
5537class StringsLocalizationDataSource : LocalizationDataSourceProtocol {
You can’t perform that action at this time.
0 commit comments