Is Factor framework 2.0 thread safe? #191
Suresh-Vialto
started this conversation in
General
Replies: 1 comment
-
It's thread safe. One request will lock and block the other until the first one completes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If resolve() and register { } methods are called at same time from different threads, is it thread safe? Will there any data inconsistencies issues?
extension Container {
var names: Factory<[String]> {
self { [] }
}
}
struct Base {
func getNames() -> [String] {
return Container.shared.names.resolve()
}
func setNames(contacts: [String]) {
Container.shared.names.register { contacts }
}
}
Beta Was this translation helpful? Give feedback.
All reactions