@Synchronized access to cache
This commit is contained in:
parent
5906c5f0fa
commit
c4ac42f738
|
@ -51,6 +51,7 @@ class ProfileFunctionImplementation @Inject constructor(
|
||||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
|
@Synchronized
|
||||||
{
|
{
|
||||||
for (index in cache.size() - 1 downTo 0) {
|
for (index in cache.size() - 1 downTo 0) {
|
||||||
if (cache.keyAt(index) > it.startDate) {
|
if (cache.keyAt(index) > it.startDate) {
|
||||||
|
|
Loading…
Reference in a new issue