Comment 4 for bug 1361935

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote : Re: [Bug 1361935] Re: laptop_mode gets executed twice on (un)plug events

On Sunday 31 August 2014 05:41 AM, Daniel Hahler wrote:
>> This must be something else, given the fact that the timestamps are
> same.
>
> Isn't this just because two processes get started simultaneously?
>
> And one of these processes then finds that the state needs not to get
> changed (after waiting for the lock).

Actually. Yes. You are right. I went back and checked the code. That
section of the code (lmt_load_config() ) is before we acquire the lock.
So based on how many events trigger, you will see equal number of
messages. But only one among them will be allowed to proceed further.

So I see this behavior fine. Do you have a different idea on how you'd
like to see it behave ?

--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."