[Idle-dev] Breakpoint is not reached in multithreading application
Dima S
spiridenok at tut.by
Thu Jan 8 15:38:09 CET 2009
Hi all,
I try to use IDLE for debugging my multithreading python application.
In my application i have the following class:
class DataMonitor( threading.Thread ):
'''Updates data with regular frequency'''
_update_frequency_in_sec = 0.5
def __init__ ( self, update_funcs, data ):
threading.Thread.__init__( self )
self._update_funcs = update_funcs
self._data = data
self._keep_running = True
def run(self):
'''Start data monitoring'''
while self._keep_running:
self._update_data()
print "i'm running"
time.sleep( self._update_frequency_in_sec )
An object of this class is created from the main thread and is stored there.
When i set breakpoints in the code that is executed in the main thread, they
are reached with no problems.
When i set breakpoints in the while loop of the run() method of my thread
class DataMonitor (at the line with print statement), the breakpoint is
never reached. However, the application keeps running and i get a lot of
"i'm running" messages in the python shell of IDLE.
My configuration:
SunOS wsasd179 5.8 Generic_117350-18 sun4u sparc SUNW,Sun-Blade-1500
Python 2.5.1 (r251:54863, Aug 6 2008, 14:27:55)
[GCC 3.4.3] on sunos5
Thanks for any help on my problem!
Regards, DimaS
-------------- next part --------------
An embedded message was scrubbed...
From: "Dima S" <spiridenok at tut.by>
Subject: Breakpoint is not reached in multithreading application
Date: Thu, 08 Jan 2009 16:35:14 +0200
Size: 1928
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20090108/781aee1e/attachment.eml>
More information about the IDLE-dev
mailing list