To demonstrate bug add print current thread commands to some params["kill"] writes, patch included here.
--- asynch_task_progressbox.py
+++ asynch_task_progressbox_debug.py
@@ -210,6 +210,7 @@
#set up params and include the kill flag
if self.params == None:
self.params = {}
+ print 'set kill false:', threading.currentThread()
self.params["kill"] = False
#tell the function to run
data = self.run_function(self.params)
@@ -219,6 +220,7 @@
#Tell the user's function that it should stop
#Note the user's function may not check this
def kill( self ):
+ print 'set kill true:', threading.currentThread()
self.params["kill"] = True
class TestWindow(gtk.Window):
Click cancel button while asynch_task_progressbox.py is running.
Output shown indicates 2 threads writing to params
set kill false: <KillableThread(Thread-1, started -1219007632)>
starting...
100
set kill true: <_MainThread(MainThread, started -1216506176)>
cancel requested
returned stopped at 101
set kill true: <KillableThread(Thread-1, started -1219007632)>
Binary package hint: quickly-widgets
To demonstrate bug add print current thread commands to some params["kill"] writes, patch included here.
--- asynch_ task_progressbo x.py task_progressbo x_debug. py currentThread( ) params[ "kill"] = False function( self.params) currentThread( ) params[ "kill"] = True
+++ asynch_
@@ -210,6 +210,7 @@
#set up params and include the kill flag
if self.params == None:
self.params = {}
+ print 'set kill false:', threading.
self.
#tell the function to run
data = self.run_
@@ -219,6 +220,7 @@
#Tell the user's function that it should stop
#Note the user's function may not check this
def kill( self ):
+ print 'set kill true:', threading.
self.
class TestWindow( gtk.Window) :
Click cancel button while asynch_ task_progressbo x.py is running.
Output shown indicates 2 threads writing to params
set kill false: <KillableThread (Thread- 1, started -1219007632)> MainThread, started -1216506176)> (Thread- 1, started -1219007632)>
starting...
100
set kill true: <_MainThread(
cancel requested
returned stopped at 101
set kill true: <KillableThread
Affects version 10.09