My problem is finishing subprocess, I use multiprocess library and in one machine with the return or exit line, the process die before the join, but in another machine not. The processes always grow and neither of them finish after do its job. In both machines the version of python is 2.7.3rc2.
semaphore_processes_limit = BoundedSemaphore(value=PROCS_LIMIT)
# Starting searches
procs = []
for word in words:
semaphore_processes_limit.acquire()
p = Process(target=searching, args=(word,))
procs.append(p)
p.start()
# Wait for all worker processes to finish
for p in procs:
p.join()
# Process
def searching(word):
return # or exit(0)
Thank you.
The server has 12 CPUs (Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz, 1200 MHz) and has installed GNU/Linux Debian Weezy.
My temporal ugly solution was: