Parallel(?) programming with python

Andreas Croci andrea.croci at gmx.de
Mon Aug 15 02:59:06 EDT 2022


I would like to thank everybody who answered my question. The insight 
was very informative. This seems to be one of the few newsgroups still 
alive and kicking, with a lot of knowledgeable people taking the time to 
help others. I like how quick and easy it is to post questions and 
receive answers here as compared to web-based forums (although there are 
some disadvantages too).

I'm implementing some of the ideas received here and I will surely have 
other questions as I go. But the project will take a long time because 
I'm doing this as a hobby during my vacation, that are unfortunately 
about to end.

Thanks again, Community.

On 08.08.22 12:47, Andreas Croci wrote:
> tI would like to write a program, that reads from the network a fixed 
> amount of bytes and appends them to a list. This should happen once a 
> second.
> 
> Another part of the program should take the list, as it has been filled 
> so far, every 6 hours or so, and do some computations on the data (a FFT).
> 
> Every so often (say once a week) the list should be saved to a file, 
> shorthened in the front by so many items, and filled further with the 
> data coming fom the network. After the first saving of the whole list, 
> only the new part (the data that have come since the last saving) should 
> be appended to the file. A timestamp is in the data, so it's easy to say 
> what is new and what was already there.
> 
> I'm not sure how to do this properly: can I write a part of a program 
> that keeps doing its job (appending data to the list once every second) 
> while another part computes something on the data of the same list, 
> ignoring the new data being written?
> 
> Basically the question boils down to wether it is possible to have parts 
> of a program (could be functions) that keep doing their job while other 
> parts do something else on the same data, and what is the best way to do 
> this.



More information about the Python-list mailing list