@Synchronized access to cache

This commit is contained in:
Milos Kozak 2021-10-14 23:14:03 +02:00
parent 5906c5f0fa
commit c4ac42f738

View file

@ -51,6 +51,7 @@ class ProfileFunctionImplementation @Inject constructor(
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
.observeOn(aapsSchedulers.io)
.subscribe(
@Synchronized
{
for (index in cache.size() - 1 downTo 0) {
if (cache.keyAt(index) > it.startDate) {