Skip to content
Compare
Choose a tag to compare
Compare
Choose a tag to compare

This release fixes a major bug in the implementation of active_group dispatcher. That bug can lead to a crash of an application.

Compare
Choose a tag to compare
Compare
Choose a tag to compare
Compare
Choose a tag to compare
Compare
Choose a tag to compare

This is mostly a maintenance release.

operator== and operator!= added to so_5::coop_handle_t (see #16).

Issues #18, #20 have been resolved.

Compare
Choose a tag to compare

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.