Threads: Issue and suggestion required

Sandeep Arya d0153030 at hotmail.com
Mon Jul 18 20:13:04 EDT 2005


Hello

I am developing an application using PyQT.


My application scenario is:: "At any instance one socket is open in my 
application. Now if user wants to execute some command on another machine/IP 
address, then i need to make another socket and execute task."

My query is. Is this possible that my main thread and my newly born thread 
will execute their task simultaneously/parallel. (I read that Python 
interpretor allows only one thread execution at a time. Using its global 
lock. And switch among active thread based on time set by setSwitchTime() 
function.. Is this correct?)

I just wannn know what is lifetime of thread. As I was planning to implement 
one function such that:

1.0 function starts
2.0 create socket
3.0 Open socket
4.0 Do whatever task to do
5.0 Close socket
6.0 Function ends

I wanna know that if i assign such above mentioned function to thread::run 
then will the thread die after step 6.0 above i.e. function ends.


Suggest me.

Thanking You

Sandeep

_________________________________________________________________
Get faster and relevant results. http://search.msn.co.in Switch to the 
smarter search!




More information about the Python-list mailing list