Open powerofpi opened 11 years ago
thanks, I'll take a look On Dec 30, 2012 6:06 PM, "powerofpi" notifications@github.com wrote:
There is a subtle race condition in UpdateService.
As soon as the alarm is set on 107, there is a race between the current thread entering its synchronized block first (and executing 110) and the new thread entering its synchronized block (and evaluating the condition on line 60).
Currently, you get lucky and avoid the issue by virtue of scheduling the alarm far into the future. However, if you shorten the time until the next update, this race will be increasingly exposed.
— Reply to this email directly or view it on GitHubhttps://github.com/eprst/KTodo/issues/3.
There is a subtle race condition in UpdateService.
As soon as the alarm is set on 107, there is a race between the current thread entering its synchronized block first (and executing 110) and the new thread entering its synchronized block (and evaluating the condition on line 60).
Currently, you get lucky and avoid the issue by virtue of scheduling the alarm far into the future. However, if you shorten the time until the next update, this race will be increasingly exposed.