Mega Code Archive

 
Categories / Python Tutorial / Buildin Module
 

Fork a thread

ret = os.fork()        # spawn 2 processes, both  return if ret == 0:           # child returns with PID of 0     child_suite        # child code else:                  # parent returns with child's PID     parent_suite       # parent code