Thread handling issue

Prasad, Ramit ramit.prasad at jpmorgan.com
Fri Oct 7 15:05:27 EDT 2011


-----Original Message-----
From: python-list-bounces+ramit.prasad=jpmorgan.com at python.org [mailto:python-list-bounces+ramit.prasad=jpmorgan.com at python.org] On Behalf Of Paul
Sent: Friday, October 07, 2011 3:29 AM
To: python-list at python.org
Subject: Thread handling issue

I'm wondering what the best solution for this problem is.

I've got a wxpython app, in one part a user makes some selections then opens a 
dialog to select where to output. At which point the app starts a thread 
processing their selection while they're choosing an output location, hopefully 
ready for when they're done.

My problem is if the user doesn't select an output location and cancels the
dialog to go back to the selection I want to terminate the thread to avoid the 
user opening and closing the output selection firing off a ton of threads. 

As there's no inbuilt way of killing threads I was wondering the best way to 
prevent this?

-- 
http://mail.python.org/mailman/listinfo/python-list
============================================================================

Why not just wait until they are done with all user input and then fire threads after that? 


Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  



More information about the Python-list mailing list