【发布时间】:2013-04-25 17:44:11
【问题描述】:
我有许多线程需要运行(大约 160 个)创建文件,然后将它们复制到不同的地方:
'Files is basically a list of strings
'which is passed to a function that creates a file from a number of database fields
'when thats done it copies it to a number of places
For Each x In Files
Dim Evaluator = New Thread(Sub() API.Files.Create.Standard(x))
Evaluator.Start()
Next
我想要它做的是关闭 160 个左右的线程(使用许可程序 x)然后等待所有线程完成,然后继续执行程序的其余部分。
【问题讨论】:
标签: vb.net multithreading