Jump to content

Inherit from Actor Framework.lvlib:Message Enqueuer.lvclass


Recommended Posts

Hi

I would like to add some more information to the Actor Framework's Message Enqueuer class, so I thought about inheriting from it, with some additional members.

However, the issue is that the only way to get the Message Enqueuer of an actor is with Read Self Enqueuer.vi, which returns a Message Enqueuer.lvclass.
And I don't find any way to transform this value into my child enqueuer class.
Message Enqueuer.lvclass does not have data accessors to let me copy its internal data, and I can't modify Message Enqueuer.lvclass.

Is what I would like to achieve impossible?

Link to comment

The Message Enqueuer instance is created within Actor.vi and encapsulates the receiving queue of the actor.
The Actor launcher does not expose any way to specify a more specific type of message enqueuer, so I'm afraid that even though you wish to extend this class, it is impossible to instantiate it with your child type.

The reason the Message Enqueuer does not let you access its private data is that it is specifically meant as a wrapper to prevent anyone from accessing the Priority Queue class. I assume the intent is to make sure you cannot mess with the message delivery principles such as rerouting messages before they arrive at the Actor Core. If it were allowed, it could cause thread safety problems, security issues (possible hacking target) or mess with the #1 feature of actors: trust that messages are processed by the core in the order the messages were enqueued.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.