nekohayo / specto

Automatically exported from code.google.com/p/specto
0 stars 0 forks source link

erratic behavior of the watch notify function #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is weird. In revision 61, I am committing an updated version of
watch.py that contains a lot of print functions. You will see stuff like
"notification step 3" appear in your terminal. Currently, the highest
number goes at 10.2 for process watches and all. This is here to help debug
the issue.

What steps will reproduce the problem?
1. disable all your watches except one website (http://specto.ecchi.ca/test)
2. start specto
3. play with refreshing/clearing/etc

What is the expected output? What do you see instead?
The prints sometimes show up to 10, sometimes they don't. As if some parts
blocked the notify process. It is quite unpredictable (if you figure out
the logic, please add a comment here).

This is a major issue. Kinda breaks everything. I THINK threading is not
the culprit, but I'm not sure. Any thoughts? I'm utterly confused with this
one, so I might add info later on if I have some luck.

Original issue reported on code.google.com by nekoh...@gmail.com on 27 Jan 2007 at 10:15

GoogleCodeExporter commented 9 years ago
Marking as "fixed" (but not "verified", in case someone still can experience 
it).
Here is an exerpt of a discussion with Wout, who seems to have fixed the issue. 
This
is just for further reference in case of problems.

Wout Clymans: did i fix issue 40?
Kiddo: yep, seems like you really did fix the weirdness [in revisions 65-66], 
or I'm
being lucky today. However, I don't quite understand what moving the 
lock.release
from the individual watches to the upper watch.py changes? And how did you 
guess that
was the fix?
Wout Clymans: lock.release() releases the thread so another thread can use it. 
but if
you release it before calling the notification, probably another thread takes 
the
lock and the other thread bloks. Today I got the same bug as you and without 
threads
it worked fine, so I started looking what could be wrong with the threads.

Original comment by nekoh...@gmail.com on 29 Jan 2007 at 5:17

GoogleCodeExporter commented 9 years ago

Original comment by nekoh...@gmail.com on 18 Mar 2008 at 2:04