I'm updating some existing code that looks like this:
for i in list
thread.start_new_thread(main, (i[0],i[1],i[2],2))
This causes threads to be created for every item in the list, but not executed until all the threads are created. I'd like to either execute the threads in small groups, or just have them execute directly after they're created.
(There are a lot of python threads discussion on here so sorry if I missed this type of question already being asked...)
start_new_threadas its name suggests starts new thread immediately. Notethreadmodule had been deprecated bythreadingmodule since 2005.