Skip to content

Commit 7fd2ce5

Browse files
committed
Add missing lock/unlock
1 parent 2d7ef8a commit 7fd2ce5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Action/InputSubject.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public class InputSubject<Element>: ObservableType, Cancelable, SubjectType, Obs
2323

2424
/// Indicates whether the subject has been isDisposed.
2525
public var isDisposed: Bool {
26-
return _isDisposed
26+
_lock.lock()
27+
let isDisposed = _isDisposed
28+
_lock.unlock()
29+
return isDisposed
2730
}
2831

2932
/// Creates a subject.

0 commit comments

Comments
 (0)