You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just an idea. It's fixed here to be investigated and, maybe, implemented in some future version of SObjectizer.
Every agent in SObjectizer has its MPSC mbox called direct mbox. This mbox is automatically created by SOEnv for every new agent. That mbox is available via agent_t::so_direct_mbox() method.
The type of that mbox is hidden from a user. A user only knows that it's an MPSC mbox.
Sometimes it can be necessary to hide the agent direct mbox and to expose some proxy instead (for example, a proxy that filters or reorders messages of some types), but it's impossible to do because anyone who has a reference to an agent can call so_direct_mbox, and so_direct_mbox isn't a virtual method.
I think that SObjectizer should have a way to specify a custom MPSC mbox to be used as the agent's direct mbox. But I don't know how to do that at the moment. It requires further thinking and prototyping.
The text was updated successfully, but these errors were encountered:
The mbox returned by the custom factory will be stored inside the agent as its direct mbox. That value then will be returned by so_direct_mbox() method (the so_direct_mbox will still be non-virtual method).
Possibility to specify custom_direct_mbox_factory added.
If custom_direct_mbox_factory is specified it's used for creation of the
direct mbox for an agent.
This is just an idea. It's fixed here to be investigated and, maybe, implemented in some future version of SObjectizer.
Every agent in SObjectizer has its MPSC mbox called direct mbox. This mbox is automatically created by SOEnv for every new agent. That mbox is available via
agent_t::so_direct_mbox()
method.The type of that mbox is hidden from a user. A user only knows that it's an MPSC mbox.
Sometimes it can be necessary to hide the agent direct mbox and to expose some proxy instead (for example, a proxy that filters or reorders messages of some types), but it's impossible to do because anyone who has a reference to an agent can call
so_direct_mbox
, andso_direct_mbox
isn't a virtual method.I think that SObjectizer should have a way to specify a custom MPSC mbox to be used as the agent's direct mbox. But I don't know how to do that at the moment. It requires further thinking and prototyping.
The text was updated successfully, but these errors were encountered: