Re: wxPython and threading issue

2006-09-29 Thread [EMAIL PROTECTED]
Patrick Smith wrote: > > Well, the problem is that you can't simply kill a thread--it shares > > memory with other threads that it could be leaving in an inconsistent > > state. Imagine that it was, say, holding a lock when it was forceably > > killed. Now any other thread that tries to acquire t

Re: wxPython and threading issue

2006-09-29 Thread Patrick Smith
"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If your thread is long running and it is not possible to easily set a > flag for it to check and bail out, then how does it display the > progress in the progress dialog. How often does that get updated? If > the progr

Re: wxPython and threading issue

2006-09-29 Thread Patrick Smith
> Well, the problem is that you can't simply kill a thread--it shares > memory with other threads that it could be leaving in an inconsistent > state. Imagine that it was, say, holding a lock when it was forceably > killed. Now any other thread that tries to acquire that lock will > block forever

Re: wxPython and threading issue

2006-09-29 Thread Nick Vatamaniuc
If your thread is long running and it is not possible to easily set a flag for it to check and bail out, then how does it display the progress in the progress dialog. How often does that get updated? If the progress dialog is updated often, then at each update have the thread check a self.please_di

Re: wxPython and threading issue

2006-09-29 Thread [EMAIL PROTECTED]
Patrick Smith wrote: > Hi, > Thanks for your reply. > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > [Re: cancelling a worker thread from the GUI thread] > > > > Have the main thread set a flag telling the worker thread to exit, and > > have the worker thread check that periodi

Re: wxPython and threading issue

2006-09-28 Thread Steve Holden
Patrick Smith wrote: > Hi, > Thanks for your reply. > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Patrick Smith wrote: >> >>>Hi, >>>I'm hoping someone here will be able to help as I've been struggling > > with > >>>this problem for a few days now. >>> >>>I'm working on a

Re: wxPython and threading issue

2006-09-28 Thread Patrick Smith
Hi, Thanks for your reply. <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Patrick Smith wrote: > > Hi, > > I'm hoping someone here will be able to help as I've been struggling with > > this problem for a few days now. > > > > I'm working on an application that is creating a Progress

Re: wxPython and threading issue

2006-09-28 Thread [EMAIL PROTECTED]
Patrick Smith wrote: > Hi, > I'm hoping someone here will be able to help as I've been struggling with > this problem for a few days now. > > I'm working on an application that is creating a ProgressDialog, and then > creating a thread that runs a function from another module in the program. > > Th

wxPython and threading issue

2006-09-28 Thread Patrick Smith
Hi, I'm hoping someone here will be able to help as I've been struggling with this problem for a few days now. I'm working on an application that is creating a ProgressDialog, and then creating a thread that runs a function from another module in the program. The problem is, when the cancel butto