如何在Powershell工作流程中排除共享变量

时间:2019-03-24 10:46:32

标签: powershell workflow

与工作流并行处理时,我想知道如何保持共享变量的完整性。

workflow func1{
 $total=1

 for-each -paralell -throttlelimit 5 ($i in 1..1000)
 {
  $workflow:total+=1
 }
}



result of this code,"total" always 1000? if not, how to keep the integrity of shared variables.

thanks you any help.

0 个答案:

没有答案