
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
We have been experimenting with Parallel threading. The situation is that I have an assembly that contains multiple parts (approx. 40) which all have contained "almost" the same code. In order to rationalize this; we have rearranged the code in such way that we now only reference External iLogic rules form these 40 part files (only one place to revise the code if necessary).
The side effect to this rationalization has been tha we have problems in executing the codes in parallel, see this simplified example:
Imports System.Threading.Tasks Parallel.For(1,40, Sub(h As Integer) iLogicVb.RunRule ("Part "& h &"", "iTriggerRule") End Sub)
Now all of these 40 part files try to execute their code.
'Configutation of Part files iTrigger=iTrigger0 iLogicVb.RunExternalRule("Cut configuration") iLogicVb.RunExternalRule("Bracing of the part") iLogicVb.RunExternalRule("Parameter context")
As they all are dependent upon running the same external rules the result is that not all part files are updated according to the required design requirements. It seem as if one of the part files calls the external rule and the rule is "busy" handling another part file it just terminates without warnings or errors.
Can multiple part files run the same external rule at the same time?
Is there some form of queue?
I do not get any warnings or errors, the partfiles just do not update. How can I make sure that all the part files run the external rules and is there a way of checking this?
Regards
Kari
Solved! Go to Solution.