MangoAutomation / ma-core-public

Mango Automation Core public code
Other
79 stars 50 forks source link

Event driven infinite loops #1056

Open Puckfist opened 7 years ago

Puckfist commented 7 years ago

Currently, it is possible to create an infinite loop of event driven components. Previously, things like threadLocal were employed in the SetPointWorkItem to check for recursion events, but it appears this is ripe for revamping (this threadLocal is likely not working as intended currently). One discussed possibility was passing a list of identifiers or hashes with events and set calls, which could then be used to check if the current setter has been a setter before.

Puckfist commented 7 years ago

Another possibility would be that when a data point (or something else, perhaps) is kicking off its even notify work item, it could use the SetPointSource to get the listener that is the setter (if existent), and remove it (if present) before starting the EventNotifyWorkItem