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 -> multiprocessin
On 25/04/18 03:26, Evuraan wrote:
> Please consider this situation :
> Each line in "massive_input.txt" need to be churned by the
> "time_intensive_stuff" function, so I am trying to background it.
What kind of "churning" is involved?
If its compute intensive threading may not be the right
answer
> Please consider this situation :
> Each line in "massive_input.txt" need to be churned by the
> "time_intensive_stuff" function, so I am trying to background it.
>
> import threading
>
> def time_intensive_stuff(arg):
># some code, some_conditional
>return (some_conditional)
>
> with open
Greetings!
Please consider this situation :
Each line in "massive_input.txt" need to be churned by the
"time_intensive_stuff" function, so I am trying to background it.
import threading
def time_intensive_stuff(arg):
# some code, some_conditional
return (some_conditional)
with open("massi