JKISoftware / JKI-State-Machine-Objects

Object-oriented framework for LabVIEW based on the JKI State Machine
BSD 3-Clause "New" or "Revised" License
96 stars 55 forks source link

[Feature] Stop dynamic dependencies anytime #28

Closed francois-normandin closed 7 years ago

francois-normandin commented 7 years ago

Owner should be able to stop dynamically-launched dependency(ies) without the process being automated in the onStop() callback. For now, the dependencies cannot be stopped without a shared key, but the shared key can only be generated by base class, which prevents managing dynamically-launched objects without stopping caller's process (called during onStop override only). Solution: expose a method to stop a dynamic dependency by name or ref.

francois-normandin commented 7 years ago

Version 1.1.11 partially implements this feature.

The feature is incomplete but usable. For completeness, the list of dynamic dependencies needs to be purged from stale references. The dependencies list should however make it in a way that does not add latency, blocking calls, create a race condition or removes a static dependency from the array stored in the SMO base. Ideally, it would be handled by SMO Base's process to avoid the list of stale dependencies from growing out of control. At the moment, a connection handler type of application would risk running into a gigantic array of stale dependencies and is technically a memory leak...

francois-normandin commented 7 years ago

released in 1.1.12