Threading -- Correct way to exit

Actually, all my non daemon threads finish, (except the main thread), then
when I click the "X" to quit the application, the window closes, but the
python process stays around. It seems that the MainThread is still hanging
around, but I'm not sure how to get rid of it. None of my threads are
currently active at this point (I'm gathering this data from
threading.enumerate() )

thoughts?
-brett

···

-----Original Message-----
From: Mike C. Fletcher [mailto:mcfletch@rogers.com]
Sent: Thursday, January 16, 2003 9:29 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Threading -- Correct way to exit

Well, if they are truly non-daemon (that is, they should hang around and
keep the app active when the main thread exits), then you should be
"joining" or ending them before exiting. Sounds like you just want to
make them daemons?

Just my impression,
Mike

Brett Humphreys wrote:

I have an application that creates multiple threads (all non daemon),
the problem I'm seeing is once these threads are created, my
wxSimpleApp never properly exits. Is there anything special that
needs to be done other than close my single frame? Or should I extend
wxApp and call SetTopWindow with my single frame?

Thanks so much.
-Brett

--
_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Brett

You may need to provide an

EVT_CLOSE(self, self.OnClose)

and sys.exit() in that method.

Nigel

···

On Thu, 16 Jan 2003 09:33:24 -0500 Brett Humphreys <brett@buildlinks.com> wrote:

Actually, all my non daemon threads finish, (except the main thread),
then
when I click the "X" to quit the application, the window closes, but the
python process stays around. It seems that the MainThread is still
hanging
around, but I'm not sure how to get rid of it. None of my threads are
currently active at this point (I'm gathering this data from
threading.enumerate() )

thoughts?
-brett

-----Original Message-----
From: Mike C. Fletcher [mailto:mcfletch@rogers.com]
Sent: Thursday, January 16, 2003 9:29 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Threading -- Correct way to exit

Well, if they are truly non-daemon (that is, they should hang around and
keep the app active when the main thread exits), then you should be
"joining" or ending them before exiting. Sounds like you just want to
make them daemons?

Just my impression,
Mike

Brett Humphreys wrote:

> I have an application that creates multiple threads (all non daemon),
> the problem I'm seeing is once these threads are created, my
> wxSimpleApp never properly exits. Is there anything special that
> needs to be done other than close my single frame? Or should I extend
> wxApp and call SetTopWindow with my single frame?
>
> Thanks so much.
> -Brett

--
Nigel W. Moriarty
Building 4R0230
Physical Biosciences Division
Lawrence Berkeley National Laboratory
Berkeley, CA 94720-8235
Phone : 510-486-5709
Fax : 510-486-5909
Email : NWMoriarty@LBL.gov
Web : CCI.LBL.gov

Nigel,
  Thanks for the tip, that seemed to work just fine.

Thanks again.
-brett

···

-----Original Message-----
From: Nigel Moriarty [mailto:a_list@attbi.com]
Sent: Thursday, January 16, 2003 11:35 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re[2]: [wxPython-users] Threading -- Correct way to exit

Brett

You may need to provide an

EVT_CLOSE(self, self.OnClose)

and sys.exit() in that method.

Nigel

On Thu, 16 Jan 2003 09:33:24 -0500 Brett Humphreys <brett@buildlinks.com> wrote:

Actually, all my non daemon threads finish, (except the main thread),
then
when I click the "X" to quit the application, the window closes, but the
python process stays around. It seems that the MainThread is still
hanging
around, but I'm not sure how to get rid of it. None of my threads are
currently active at this point (I'm gathering this data from
threading.enumerate() )

thoughts?
-brett

-----Original Message-----
From: Mike C. Fletcher [mailto:mcfletch@rogers.com]
Sent: Thursday, January 16, 2003 9:29 AM
To: wxPython-users@lists.wxwindows.org
Subject: Re: [wxPython-users] Threading -- Correct way to exit

Well, if they are truly non-daemon (that is, they should hang around and
keep the app active when the main thread exits), then you should be
"joining" or ending them before exiting. Sounds like you just want to
make them daemons?

Just my impression,
Mike

Brett Humphreys wrote:

> I have an application that creates multiple threads (all non daemon),
> the problem I'm seeing is once these threads are created, my
> wxSimpleApp never properly exits. Is there anything special that
> needs to be done other than close my single frame? Or should I extend
> wxApp and call SetTopWindow with my single frame?
>
> Thanks so much.
> -Brett

--
Nigel W. Moriarty
Building 4R0230
Physical Biosciences Division
Lawrence Berkeley National Laboratory
Berkeley, CA 94720-8235
Phone : 510-486-5709
Fax : 510-486-5909
Email : NWMoriarty@LBL.gov
Web : CCI.LBL.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

Brett Humphreys wrote:

Actually, all my non daemon threads finish, (except the main thread), then
when I click the "X" to quit the application, the window closes, but the
python process stays around. It seems that the MainThread is still hanging
around, but I'm not sure how to get rid of it. None of my threads are
currently active at this point (I'm gathering this data from
threading.enumerate() )

thoughts?

Do you have any dialogs that were not Destroy()'d?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!