Need advise about an application

Hendrik van Rooyen mail at
Mon Apr 6 10:27:31 CEST 2009

"azrael" <> wrote:

> I guess that this is not an option because of the case that the
> calculation of the needed statistics takes not always the same time
> nad I am afraid tht using sleep() would after a couple of time periods
> skip a meassurement.

If I understand correctly what you are attempting,
I would use three threads:

one to do the serial stuff - it is responsible for getting
a slug of data in, checking for errors, doing protocol
stuff like re tries, etc.

One to store the slug in the database, making sure it
is written.

One to display the results.

Glue them together with queues.

If ever you need more performance, make the
threads processes, and replace the queues by pipes.

- Hendrik

More information about the Python-list mailing list