File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
rxjava-core/src/main/java/rx/internal/operators Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,28 @@ public OperatorTakeUntil(final Observable<? extends E> other) {
35
35
36
36
@ Override
37
37
public Subscriber <? super T > call (final Subscriber <? super T > child ) {
38
+ final Object guard = new Object ();
38
39
final Subscriber <T > parent = new Subscriber <T >(child ) {
39
40
40
41
@ Override
41
42
public void onCompleted () {
42
- child .onCompleted ();
43
+ synchronized (guard ) {
44
+ child .onCompleted ();
45
+ }
43
46
}
44
47
45
48
@ Override
46
49
public void onError (Throwable e ) {
47
- child .onError (e );
50
+ synchronized (guard ) {
51
+ child .onError (e );
52
+ }
48
53
}
49
54
50
55
@ Override
51
56
public void onNext (T t ) {
52
- child .onNext (t );
57
+ synchronized (guard ) {
58
+ child .onNext (t );
59
+ }
53
60
}
54
61
55
62
};
You can’t perform that action at this time.
0 commit comments