def startProcesses(self):
self.process_map = {} <EOL>for mvision_class in self.mvision_classes:<EOL><INDENT>name = mvision_class.name<EOL>tag  = mvision_class.tag<EOL>num  = mvision_class.max_instances        <EOL>if (tag not in self.process_map):<EOL><INDENT>self.process_map[tag] = []<EOL>for n in range(<NUM_LIT:0>, num):<EOL><INDENT>p = mvision_class()<EOL>p.start()<EOL>self.process_map[tag].append(p)<EOL><DEDENT><DEDENT><DEDENT>
Create and start python multiprocesses

        Starting a multiprocess creates a process fork.

        In theory, there should be no problem in first starting the multithreading environment and after that perform forks (only the thread requestin the fork is copied), but in practice, all kinds of weird behaviour arises.

        Read all about it in here : http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them