Let s say I have a workflow, and I want to execute it many times in parallel:
System.Threading.Tasks.Parallel.For(
0,
100,
i => WorkflowInvoker.Invoke(
new Workflow1(),
new Dictionary<string, object> { { "Num", i } }));
我很想知道,以这种方式执行:
var w = new Workflow1();
System.Threading.Tasks.Parallel.For(
0,
100,
i => WorkflowInvoker.Invoke(
w,
new Dictionary<string, object> { { "Num", i } }));