Sign Up

Async Methods Actor by LS Instruments AG - Toolkit for LabVIEW Download

A library that extends the Actor Framework to allow for async method execution

D Discussion Watch * 0 ↓115
 logo
Version0.3.0.4
ReleasedMay 05, 2024
Publisher LS Instruments AG
License BSD License 2.0
LabVIEW VersionLabVIEW>=23.3
Operating System Windows, Mac, and Linux
Dependencies oglib_error   oglib_lvdata   vipm_lib_labview_collection_extensions  
Project links Homepage   Discussion

Description

An Actor-based library that implements an infrastructure for launching async methods. By making actors inherit from the "Async Mathods Actor", it is possible to launch any method without waiting for its conclusion, by sending messages child of the abstract message "Async Message.lvclass". This framework is especially useful for tasks that take a long time to execute which implemented as Actor methods would lock the actor until completion. The official way to implement those tasks in the Actor Framework is to code them as helper loops within the "Actor Core.vi". This however brings along the overhead of setting up a communication mechanism between Actor methods and the helper loop, thus voiding the advantage of OOP encapsulation. Using this framework you continue to benefit from OOP encapsulation of the Actor Framework for long execution tasks without having to implement ad-hoc data transfer methods between methods and helper loops.

Release Notes

0.3.0.4 (May 05, 2024)

- Introduced a "VI Refnum Lifetime" enumeration which can take values "Destroy on Exit", " Destroy on Actor Exit ", and “Destroy on Application Exit”. This enumeration dictates the lifetime strategy adopted for the VI Server Refnum of the Async Method. In the first case the "Async Methods Actor" destroys the reference as soon as the Async Method exits, in the second case the VI Refnums will be destroyed once the “Async Method Actor” exits, while in the last case, VI Refnums are never destroyed. “Destroy on Exit” is the default option when un-wired. The motivation for this setting is related to the required lifetimes of the refnums (e.g. notifier’s references) created within the Async Method. This lifetime is the same as the VI Refnum lifetime, hence if we want they outlive the execution of the Async Method we have to set it to either “Destroy on Actor Exit” or “Destroy on Application Exit”. This option applies only to Async Methods called with the “Call and Collect” option (Issue # 3)
- Added the functionality of reporting the standard error output of the Async Method to the calling actor (Issue #4)
- Added the ability to to access the error in the Async Method standard output form within the "Completion Notification Msg" message. A further abstract subclass called "Compl Notif with Error Msg" was introduced whose Do.vi method merges the standard error output of the Async Method executed and that defines a new dynamic dispatch method to be overridden, called "Actor Core.vi" to implement a caller Actor method call (Issue #1)

andreav-lsi was a contributor to this release


Download Package

Versions
All Contributors

  Post an Idea   Post a Resource

Recent Posts