You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
This issue only relates to a single feature. I will open new issues for any other features.
Is your feature request related to a problem?
Noted in one of the race fixes PRs, this sleep looks suspicious. Sleeping to avoid race conditions is almost always a hacky solution around what really is lack of synchronization. We should look at if this sleep is correct.
time.Sleep(time.Millisecond*100) // writes are not always atomic. 10ms worked, 100 is safer.
p.prefLock.Lock()
p.savedRecently=false
changedDuringSaving:=p.changedDuringSaving
p.changedDuringSaving=false
p.prefLock.Unlock()
ifchangedDuringSaving {
p.save()
}
}()
}
Is it possible to construct a solution with the existing API?
Yes
Describe the solution you'd like to see.
We need to find out how these writes are happening and in what way operations need to be synchronized. Perhaps running them on the same thread does not cause any problems? Maybe we just need some kind of locking inbetween?
The text was updated successfully, but these errors were encountered:
Checklist
Is your feature request related to a problem?
Noted in one of the race fixes PRs, this sleep looks suspicious. Sleeping to avoid race conditions is almost always a hacky solution around what really is lack of synchronization. We should look at if this sleep is correct.
fyne/app/preferences.go
Lines 50 to 63 in 4a875d9
Is it possible to construct a solution with the existing API?
Yes
Describe the solution you'd like to see.
We need to find out how these writes are happening and in what way operations need to be synchronized. Perhaps running them on the same thread does not cause any problems? Maybe we just need some kind of locking inbetween?
The text was updated successfully, but these errors were encountered: