@@ -726,7 +726,7 @@ public synchronized void onNext(V value) {
726726
727727
728728 @ Override
729- public void onComplete () {
729+ public synchronized void onComplete () {
730730 super .onComplete ();
731731 assertResultSize (keys , completedValues );
732732
@@ -735,7 +735,7 @@ public void onComplete() {
735735 }
736736
737737 @ Override
738- public void onError (Throwable ex ) {
738+ public synchronized void onError (Throwable ex ) {
739739 super .onError (ex );
740740 ex = unwrapThrowable (ex );
741741 // Set the remaining keys to the exception.
@@ -777,7 +777,7 @@ private DataLoaderMapEntrySubscriber(
777777
778778
779779 @ Override
780- public void onNext (Map .Entry <K , V > entry ) {
780+ public synchronized void onNext (Map .Entry <K , V > entry ) {
781781 super .onNext (entry );
782782 K key = entry .getKey ();
783783 V value = entry .getValue ();
@@ -791,7 +791,7 @@ public void onNext(Map.Entry<K, V> entry) {
791791 }
792792
793793 @ Override
794- public void onComplete () {
794+ public synchronized void onComplete () {
795795 super .onComplete ();
796796
797797 possiblyClearCacheEntriesOnExceptions (clearCacheKeys );
@@ -804,7 +804,7 @@ public void onComplete() {
804804 }
805805
806806 @ Override
807- public void onError (Throwable ex ) {
807+ public synchronized void onError (Throwable ex ) {
808808 super .onError (ex );
809809 ex = unwrapThrowable (ex );
810810 // Complete the futures for the remaining keys with the exception.
0 commit comments