publish codes to several machines in multi-threads