I was wonder about the proper usage of ManualWorkflowSchedulerService.RunWorkflow(). Do I need to synchronize calls to the same workflowInstanceId across threads when I call ManualWorkflowSchedulerService.RunWorkflow?
I was wonder about the proper usage of ManualWorkflowSchedulerService.RunWorkflow(). Do I need to synchronize
Share
No, I don’t think so. Following is a relevant excerpt from the book ‘Essential Windows Workflow Foundation’
EDIT: In order to further investigate the issue, I created a wf with a
ParallelActivitywhich contains twoHandleExternalEventactivities. Theinvokedhandler of each activity simply puts its thread to sleep for 3 seconds. In the host program, I created two threads and trigger the two events via the service. Moreover, I subclass theManualWorkflowSchedulerServicein order to track itsSchedulemethod. Here are the results (the time is in 10ths of ms):Some remarks:
If the latter is your concern, I would suggest the following posts:
BTW, can you share some info about the scenario that you are facing?