Releases: Stiffstream/sobjectizer
v.5.7.0.1
v.5.7.0
There are two significant changes in v.5.7.0.
The first one is support for send-cases in select()
function. Now select()
can be used for sending a message to a mchain only when that mchain has a free room for a new message. For example:
using namespace so_5;
select(from_all().handle_n(1).total_time(250ms),
send_case(ch, message_holder_t<MyMsg>::make(...),
[]{ std::cout << "MyMsg sent!" << std::endl; }));
In that case select()
will wait until ch
can accept a new instance of MyMsg, but no more than 250ms.
Note that there is a breaking change in the updated implementation of select()
: there is no more case_
function for the definition of receive-cases for select()
, it is renamed to receive_case()
. It means that old code like that:
using namespace so_5;
select(from_all().handle_n(1),
case_(ch1, ...),
case_(ch2, ...),
case_(ch3, ...));
should be rewritten that way:
using namespace so_5;
select(from_all().handle_n(1),
receive_case(ch1, ...),
receive_case(ch2, ...),
receive_case(ch3, ...));
More info about the new feature of select()
function can be found in the project's Wiki.
The second significant change in v.5.7.0 is a fix for a flaw of integration of enveloped messages into the message-dispatching mechanism with respect to agents those are hierarchical state machines with the usage of transfer_to_state()
and suppress()
features.
In the previous versions of SObjectizer-5 the triggering of transfer_to_state()
and suppress()
handlers lead to notification about message delivery (the envelope was informed about the handling of the envelope's payload) even if the payload was ignored by the target agent.
Version 5.7.0 fixes that behavior and an envelope now get notification about message delivery only if the payload is actually delivered to the target agent and isn't ignored by transfer_to_state()
and suppress()
handlers.
v.5.6.2
v.5.6.1
Extensible-select added in the form of new make_extensible_select()
and add_select_cases()
functions, and a new overload of select()
function.
The implementation of prepared-select refactored. Now parallel/nested calls to select()
for the same prepared-select are checked.
Some fixes in CMake-based build scripts.