Spawn Multiple Threads for work then wait until all finished

后端 未结 12 1568
遇见更好的自我
遇见更好的自我 2020-11-28 01:46

just want some advice on \"best practice\" regarding multi-threading tasks.

as an example, we have a C# application that upon startup reads data from various \"type

12条回答
  •  囚心锁ツ
    2020-11-28 02:19

    Assuming the database reader threads return as soon as they're done, you can simply call Thread.Join on all ten threads in turn from the initiating thread.

提交回复
热议问题