threads - was:Is there a way to protect a piece of criticalcode?

R

Ray Schumacher

Hendrik van Rooyen said:
> Similarly discrete background thread jobs can be used
> in a functional style this way:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/491280
> ( an alternative for the laborious OO-centric threading.

With the various options available, many of which I haven't used
(CallQueue for example), I am wondering what the "best" methodology
to use is for a 2-task example on a dual core processor for my next project:

-One task is an ADC data collection/device driver whose sole job in
life is to fill a numpy "circular buffer" with data from an external
ADC device at high speed and expose a pointer - programmatically
complex but functionally distinct from the analysis task. It is I/O
bound and spends time waiting on the ADC.
-The main task is analysis of that data in near-real time with FFT,
correlations etc, and computationally bound. It needs to have read
access to the array and a pointer, and kill the ADC task when desired.

Thoughts/opinions are humbly requested,
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top