初学者 - 我正在建立一个测试站,而且我在协调背景工作者时遇到了麻烦。这就是我要做的事情:
Dim start as boolean = false
click start button
backgroundworker1.runworkerasync()
backgroundworker2.runworkerasync()
backgroundworker1.dowork
Home all axis
Open port
Turn on current
For stations = 0 to 10
start = True
'I need this backgroundworker to wait until it gets
'a temperature from backgroundworker 2 before moving
'on to the next station
next
end sub
backgroundworker2.dowork
if start = true then
measure temperature
wait until the temperature stabilizes
store temperature to array
endif
end sub
如果backgroundworker2在backgroundworker1中完成for循环,我将如何等待下一步?