Mercurial > scratch
comparison pydershell/pydershell.py @ 13:2a3313bfe574
Minor refactoring.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 06 Sep 2009 14:27:03 -0700 |
parents | f024e41d0fb9 |
children | 9bcbf780581f |
comparison
equal
deleted
inserted
replaced
12:f024e41d0fb9 | 13:2a3313bfe574 |
---|---|
12 """ | 12 """ |
13 Watches active JS contexts and triggers their operation callbacks | 13 Watches active JS contexts and triggers their operation callbacks |
14 at a regular interval. | 14 at a regular interval. |
15 """ | 15 """ |
16 | 16 |
17 def __init__(self, interval=0.25): | 17 DEFAULT_INTERVAL = 0.25 |
18 | |
19 def __init__(self, interval=DEFAULT_INTERVAL): | |
18 threading.Thread.__init__(self) | 20 threading.Thread.__init__(self) |
19 self._lock = threading.Lock() | 21 self._lock = threading.Lock() |
20 self._stop = threading.Event() | 22 self._stop = threading.Event() |
21 self._contexts = [] | 23 self._contexts = [] |
22 self.interval = interval | 24 self.interval = interval |