2

我的代码中有五个线程...

五个线程由 main.py 启动

所以对于每个正在运行的线程,我需要将 diff IP 设置为环境值

thread-1: has to set 192.168.10.2
thread-2: has to set 192.168.10.3
thread-3: has to set 192.168.10.4
thread-4: has to set 192.168.10.5
thread-5: has to set 192.168.10.6 

请指导我解决这个问题

4

1 回答 1

8

环境变量是按进程设置的,而不是按线程设置的。

于 2012-09-08T18:01:08.463 回答