from app import XProcess from multiprocessing import Lock if __name__ == '__main__': lock = Lock() for i in range(0, 16): XProcess(i, lock).start()