File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/events Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package com.onesignal.common.events
33import com.onesignal.common.threading.suspendifyOnMain
44import kotlinx.coroutines.Dispatchers
55import kotlinx.coroutines.withContext
6+ import java.util.*
67
78/* *
89 * A standard implementation that implements [IEventNotifier] and additional functionality to make
@@ -13,7 +14,7 @@ open class EventProducer<THandler> : IEventNotifier<THandler> {
1314 override val hasSubscribers: Boolean
1415 get() = _subscribers .any()
1516
16- private val _subscribers : MutableList <THandler > = mutableListOf ()
17+ private val _subscribers : MutableList <THandler > = Collections .synchronizedList( mutableListOf () )
1718
1819 override fun subscribe (handler : THandler ) {
1920 _subscribers .add(handler)
You can’t perform that action at this time.
0 commit comments