Stiffstream / sobjectizer

An implementation of Actor, Publish-Subscribe, and CSP models in one rather small C++ framework. With performance, quality, and stability proved by years in the production.

Home Page:https://stiffstream.com/en/products/sobjectizer.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

so_5::details::make_message_instance_impl metafunction doesn't set message mutability flag properly

eao197 opened this issue · comments

It seems that make_message_instance_impl should call mark_as_mutable_if_necessary:

template< bool is_signal, typename Msg >
struct make_message_instance_impl
{
using E = typename message_payload_type< Msg >::envelope_type;
template< typename... Args >
[[nodiscard]]
static std::unique_ptr< E >
make( Args &&... args )
{
ensure_not_signal< Msg >();
return std::unique_ptr< E >( new E( std::forward< Args >(args)... ) );
}
};

Without this call limit_then_transform can make a mutable message and send it into MPMC mbox.

The fix will be a part of upcoming 5.8.1 release.