[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    asynchronous comunication, wxPython and threads.
From:       Zunbeltz Izaola <zunbeltz () gmail ! com>
Date:       2005-06-21 13:22:07
Message-ID: pan.2005.06.21.13.22.06.943146 () gmail ! com
[Download RAW message or body]

Hi,

I have the following problem.

I'm developing a GUI program (wxPython). This program has to comunicate
(TCP) whit other program that controls a laboratory machine to do a
measurement. I have a dialog box, wiht two buttoms "Start measurement" and
"Stop". "Start" executes a function that do the measurement in the
following way.

1) My program send a socket.
2) The other program recives it an send confirmation.
3) My program waits for the confirmation and send the next when
confirmation received.

This comunication is done in a new thread not to frezee the GUI.
The problem is that when "Stop" is done (it kills the thread) some
confirmation sockets are mixed (are not receibed in the correct order
although i use tcp).

I have been told not to do comunication in a new thread; instead, I should
use asyncronus comunication.

My question:

What module should i use, asyncore, asynchat, twisted,(anohter) 
How can i implement this asynchronous comunication and the ability to
stop this long run funciton (the measurement can take hours or days, so
i need a way to stop it)?
Can asynchronous comunication garantee that the confirmation socket will
arrive in the correct order (one after each sended socket)? 

Thanks for your help

Zunbeltz Izaola
-- 
http://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic