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 } }));
I wonder, is it legal to execute it this way:
var w = new Workflow1();
System.Threading.Tasks.Parallel.For(
0,
100,
i => WorkflowInvoker.Invoke(
w,
new Dictionary<string, object> { { "Num", i } }));