[Tutor] threading for each line in a large file, and doing it right

Alan Gauld alan.gauld at yahoo.co.uk
Wed Apr 25 05:43:08 EDT 2018


On 25/04/18 09:27, Alan Gauld via Tutor wrote:

>> for i in $(< massive_input.file); do
>>     time_intensive_stuff_in_bash i & disown
>>     :
>> done
> 
> Its the same except in bash you start a whole
> new process so instead of using threading you
> use concurrent. 

concurrent -> multiprocessing
doh!

sorry
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list