if name == 'main':
adb = ADB()
dIdList = adb.get_devices()
if len(dIdList) == 0:
print("请先连接设备")
else:
process_list = []
for phone in dIdList:
p = Process(target=test, args=(phone, ))
p.start()
process_list.append(p)
for progress in process_list:
progress.join()
print('结束测试')
运行直接崩溃崩溃日志:
objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
uiautomator2 2.16.23
def test(device_id): d = u2.connect(device_id)
if name == 'main': adb = ADB() dIdList = adb.get_devices() if len(dIdList) == 0: print("请先连接设备") else: process_list = [] for phone in dIdList: p = Process(target=test, args=(phone, )) p.start() process_list.append(p)
运行直接崩溃崩溃日志: objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. objc[75376]: +[NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.