multiprocess and multithread code example