I'm having a problem starting more than 8 threads using threading
in Python 2.7 (running on Raspbian Jessie).
If I run
import threading
my_func_1()
my_func_2()
my_func_3()
my_func_4()
my_func_5()
threading.Thread(target=my_func_6).start()
my_func_7()
my_func_8()
my_func_9()#this is never reached
my_func_10()#nor this
where functions 1-5,7-10 have the form:
def my_func_1():
global some_global_vars
#do stuff here, involving global and local variables...
threading.Timer(0.02,my_func_1).start()
and function 6 has the form
def my_func_6():
while 1:
#do stuff
then only the first 8 functions get executed. I feel this might be related to thread-per-process limits in linux but I couldn't quite get my head around it. Individually the functions run fine, and it's always the first 8 that execute (regardless of the order they're launched in).
How would I check if it's a thread-per-process issue? Or is it something else altogether?