![]() |
little help understand python + dbus loop + sleep
Hi , i am trying to learn dbus to make a few changes to the call proccess but i am facing a problem that i can not understand.
Here is a very simple example of a python code that SHOULD reject a call with their respective output. Code:
import gobject Since, i believe, the call is not fully established release will execute but not drop the call. Here is the output... callDetected() at2010-12-02 22:30:23.555880 Running disconnect() at2010-12-02 22:30:23.557619 The disconnect was executed almost at the same time frame that callDetected() like i expect. Now, i added a delay before execute the disconnect() method to give time to the connection be really made so i would expect the connection be dropped just fine. Code:
import gobject callDetected() at2010-12-02 22:33:13.602907 Running disconnect() at2010-12-02 22:33:22.481692 Why if i put it to sleep 1 second, the delay is over 11 seconds ? One thing i have noticed is that during these 11 seconds i can not even type in the ssh shell, it is like the phone is too busy ... though the UI is answering just fine. |
Re: little help understand python + dbus loop + sleep
i would try to disable the cpu scheduler with the instructions here:
http://talk.maemo.org/showthread.php?t=47479 sleep commands usually put threads to sleep for a minimum amount of time, and it's usually going to sleep for longer than you specify. if the cpu scheduler decides the incoming call is important, it might ignore your thread for a while. i dunno. maybe you have some other error but i don't know python :) |
Re: little help understand python + dbus loop + sleep
Quote:
If gobject.timeout_add_seconds is available, you may prefer to use that instead. |
Re: little help understand python + dbus loop + sleep
disable cgroups make the application works fine ...
Is there any colateral effect doing this ? |
Re: little help understand python + dbus loop + sleep
You will notice phone app may lag on heavy load and you will miss calls.
|
All times are GMT. The time now is 19:43. |
vBulletin® Version 3.8.8