Skip to content

Commit d2ae29a

Browse files
committed
Updated documentation and finalized VIPM package
1 parent ddebad6 commit d2ae29a

10 files changed

Lines changed: 38 additions & 12 deletions

Async Methods Actor.aliases

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[My Computer]
2-
My Computer = "172.31.16.1"
2+
My Computer = "172.20.224.1"

Async Methods Actor.vipb

Lines changed: 23 additions & 11 deletions
Large diffs are not rendered by default.
4 Bytes
Binary file not shown.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,34 @@ If you want to get more control over the asynchronous call you can use the "Send
1818
Actor that implements an infrastructure for launching async methods. By making actors inherit from this 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.
1919

2020
### The "Running Methods Communication" property
21+
22+
![Running Methods Communication](media/Running%20Methods%20Communication.png)
23+
2124
This property allows setting up a communication method based either on a notifier or an event structure that allows the subscriber to receive information about the Async Messages currently running. The subscriber will receive the FQN of the running Async Messages, the number of running Async Messages launched by the "Call & Collect" method and the number of launched Async Messages launched by the "Call & Collect" method. The setting is controlled by the "" enum that can take values "None" (default), "Notifier" and "Event": the first disables the communication, the second sets it up by means of a notifier that can be accessed by means of the "Async Messages Running Notifier" while the third sets it up by means of a event mechanism whose reference can be accessed by means of the "Async Messages Running Event Ref".
2225

2326
## The "Async Message.lvclass" abstract message
2427
Subclass this message and implement the Do.vi method to execute such a method in an async manner. This is useful for long-lasting methods that would lock the actor during their execution. You can configure this message by setting the Async Call method property. The property enumeration can take values "Call and Collect" and "Call and Forget". In the former case the "Async Methods Actor" will track the execution of the methods by waiting for their completion, in the latter case instead the actor will not wait for their completion but will just count their launch. The execution of "Call and Collect" methods and the launch of "Call and Forget" can be followed by subscribing to the "Async Methods Running Notifier" available from the corresponding property of the "Async Methods Actor". "Call and Forget" use is discouraged and is meant to cater to situations where the lifetime of the method execution is supposed to survive the lifetime of the "Async Methods Actor". The message can be also configured by setting a previously created concrete subclass of the "Completion Notification Msg" and a caller enqueuer, if both settings are performed upon completion of the "Call and Collect" Async Message method the Async Method Actor will send the aforementioned concrete "Completion Notification Msg" message to the caller that will enable the caller to obtain a copy of the Async Message and the current number of running "Call and Collect" messages of this kind. The copy of the message will allow the caller to access the GUID and FQN of the conclude Async Message by means of the corresponding Async Message properties
2528

2629
### The "Send Async Message.vi" method
2730

31+
![Send Async Message](media/Send%20Async%20Message.png)
32+
2833
This VI sends a concrete Async Message to an "Async Methods Actors" actor.
2934

3035
Wire a properly configured (see message documentation for discovering configuration options) concrete subclass of the "Async Message" terminal to call a specific method of a subclass of the "Async Methods Actor". The VI will output the GUID generatied for the corresponding message sending.
3136

3237
Optionally you can wire an "Async Call Method" enumeration. This can take values "Call and Collect" and "Call and Forget". In the former case the "Async Methods Actor" will track the execution of the methods by waiting for their completion, in the latter case instead the actor will not wait for their completion but will just count their launch.
3338

3439
### The "Caller Enqueuer" property
40+
41+
![Caller Enqueuer Property](media/Caller%20Enqueuer%20Property.png)
42+
3543
Sets the caller equeueur to which notify the completion of the Async Method by means of the concreate subclass of the "Completion Notification Msg.lvclass" (specified by the "Completion Notification Msg" property). The caller will receive the completed Async Message allowing the access by means of it property to its GUID and FQN as well as the remaining number of "Call and Collect" Async Messages of the same type. To enable the callee Async Methods Acor to notify completion both this property and the "Completion Notification Msg" must be properly set.
3644

3745
### The "Completion Notification Msg" property
46+
47+
![Completion Notification Message Property](media/Completion%20Notification%20Message%20Property.png)
48+
3849
Sets a concrete subclass of the "Completion Notification Msg.lvclass" abstract message to notify the caller (specified by the "Caller Enqueuer" property) about completion of Async Message. The caller will receive the completed Async Message allowing the access by means of it property to its GUID and FQN as well as the remaining number of "Call and Collect" Async Messages of the same type. To enable the callee Async Methods Acor to notify completion both this property and the "Caller Enqueuer" must be properly set.
3950

4051
## The "Completion Notification Msg.lvclass" abstract message

media/Caller Enqueuer Property.png

4.17 KB
Loading
4.56 KB
Loading
6.98 KB
Loading

media/Send Async Message.jpg

55.9 KB
Loading

media/Send Async Message.png

35.7 KB
Loading
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:c7f259cc29ec83dd8fcf9ab94403f701a64994a716b78e2745b0d062c0d45f61
3+
size 530710492

0 commit comments

Comments
 (0)