mirror of
https://github.com/qvacua/vimr.git
synced 2025-01-02 18:54:21 +03:00
Lock conditions somewhere else
This commit is contained in:
parent
76adcb5e79
commit
b226bb15a1
@ -47,14 +47,15 @@ public class Connection {
|
||||
}
|
||||
|
||||
public func stop() {
|
||||
locked(with: self.conditionsLock) {
|
||||
self.conditions.values.forEach { condition in
|
||||
locked(with: condition) { condition.broadcast() }
|
||||
}
|
||||
}
|
||||
|
||||
locked(with: self.sessionLock) {
|
||||
self.stopped = true
|
||||
|
||||
locked(with: self.conditionsLock) {
|
||||
self.conditions.values.forEach { condition in
|
||||
locked(with: condition) { condition.broadcast() }
|
||||
}
|
||||
}
|
||||
|
||||
self.session.disconnectAndStop()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user