SObjectizer
5.5
|
Exception-related restrictions are somewhat relaxed.
Until v.5.5.24.3 SObjectizer expected only exceptions which are derived from std::exception class. That means that if an user write an event-handler in the form:
such event-handler will crash the whole application.
Since v.5.5.24.3 SObjectizer uses "catch(...)" handler for exceptions which are thrown from:
Please note that there are still some places where only exceptions derived from std::exception class can be thrown:
Just a bugfix release.
Flags -fvisibitity=hidden and -fvisibility-inlines-hidden are now used for Unix builds (Linux, FreeBSD, MacOS). This reduces count of public symbols in SObjectizer's .so library.
Mechanism of so_5::event_queue_hook_t added. See so-5.5.24 event_queue_hook for more details.
The first version of experimental support for unit-testing of agents added.
Some internal refactoring and optimizations.
so_5::message_kind_t, so_5::message_t::kind_t, so_5::message_t::so5_message_kind() and related stuff are introduced.
A new namespace so_5::enveloped_msg is introduced. See so-5.5.23 Enveloped Messages for more details.
so_5::abstract_message_box_t::do_deliver_enveloped_msg() introduced.
so_5::abstract_message_box_t::delegate_deliver_message_from_timer() introduced.
An error code so_5::rc_transfer_to_state_loop added and run-time detection of transfer_to_state loops is implemented.
A new experimental mechanism for filtering msg_tracing messages is introduced. It includes new types so_5::msg_tracing::trace_data_t, so_5::msg_tracing::filter_t (and some more related types in so_5::msg_tracing namespace), new methods so_5::environment_t::change_message_delivery_tracer_filter() and so_5::environment_params_t::message_delivery_tracer_filter(), and new free functions like so_5::msg_tracing::make_filter(), so_5::msg_tracing::make_disable_all_filter(), so_5::msg_tracing::make_enable_all_filter().
Free functions can be used as handlers for so_5::receive() and so_5::select() functions. For example it is possible to write something like:
Method so_5::agent_t::so_current_state() now returns expected value in on_enter/on_exit state's handlers. For example, the following asserts will work correctly since v.5.5.22:
New examples selective_msg_tracing and nohandler_msg_tracing added.
Deadletter handlers are introduced. See so-5.5.21 Deadletter Handlers for more details.
Negative values of pause
and period
for so_5::send_delayed(), so_5::send_periodic(), so_5::environment_t::schedule_timer() and so_5::environment_t::single_timer() are now explicitely disabled. Values of pause
and period
are checked at run-time and an exception is thrown if a value is negative. There are new error codes so_5::rc_negative_value_for_pause and so_5::rc_negative_value_for_period for such cases.
Operator so_5::state_t::operator!=() added.
noexcept
marks are set for so_5::intrusive_ptr_t and so_5::timer_id_t classes.
Const methods of agents can now be used as event handlers.
Const methods of agents can now be used as on_enter/on_exit handlers for agent's states.
Support for CMake has been enhanced.
New overloads for so_5::send_delayed(target, pause, mhood) and so_5::send_periodic(target, pause, period, mhood) have been added.
Timers' implementation has been switched to timertt-1.2.2.
If a compiler supports [[nodiscard]]
attribute then this attribute will be used for so_5::send_periodic
functions.
Now it is possible to check presense of a subscription to a message. See so-5.5.19 Checking the Presence of a Subscription for more details.
New methods are introduced: so_5::agent_t::so_has_subscription(), so_5::state_t::has_subscription(), so_5::state_t::drop_subscription().
Fix implementation of so_5::agent_t::so_drop_subscription() and so_5::agent_t::so_drop_subscription_for_all_states() for cases when an event-handler returns non-void.
Fixes for warnings detected by clang-5.0.0 on high warning levels.
Some version-specific macros are introduced: SO_5_VERSION_MAJOR, SO_5_VERSION_MINOR, SO_5_VERSION_PATCH, SO_5_VERSION, SO_5_VERSION_MAKE.
Method make_trace in msg_tracing-implementation tracers is now public. It simplifies implementation of custom mboxes.
A new entity so_5::stop_guard_t is added. See so-5.5.19 Stop Guards for more details.
New methods: so_5::environment_t::setup_stop_guard() and so_5::environment_t::remove_stop_guard().
New example stop_guard is added.
Method so_5::environment_t::make_custom_mbox() and new type so_5::mbox_creation_data_t. See so-5.5.19 Custom mbox Creation Procedure for more details.
Class so_5::null_mutex_t added.
Helper template so_5::details::lock_holder_detector added to simplify development of SObjectizer's extensions and additional libraries.
New format of send-functions, see so-5.5.19 New Format of Send Functions to Simplify Message Redirection for more details.
Mutable messages are supported now. See so-5.5.19 Mutable Messages for more details.
An ability to run SObjectizer Environment in a single threaded mode is implemented. See so-5.5.19 Environment Infrastructures for more details.
Function so_5::create_default_disp_binder() is deprecated. New function so_5::make_default_disp_binder() must be used instead.
New examples: hello_world_simple_not_mtsafe, modify_resend_as_immutable, mutable_msg_agents, wrapped_env_demo_3, two_handlers.
New behavior for delivery of delayed and periodic messages to overloaded message chains. See so-5.5.18: Overloaded mchains and delayed/periodic messages delivery for details.
New messages so_5::stats::messages::distribution_started and so_5::stats::messages::distribution_finished. See also so-5.5.18: New messages distribution_started and distribution_finished for more details.
Support for global lock_factories. Class so_5::queue_locks_defaults_manager_t and method so_5::environment_params_t::queue_locks_defaults_manager(). See also so-5.5.18: Global lock_factories for more details.
Nested state switch is explicitely disabled. See so-5.5.18: Nested state switch is explicitly disabled for more details.
Work thread activity tracking. See so-5.5.18: Work thread activity tracking for more details.
SObjectizer can be built as shared or static library. See so-5.5.17: SObjectizer as static library for more details.
New functions so_5::prepare_receive(), so_5::receive(const prepared_receive_t< HANDLERS_COUNT > &), so_5::prepare_select(), so_5::select(const prepared_select_t< CASES_COUNT > &). See so-5.5.17: prepare_receive and prepare_select functions for more details.
New method so_5::mchain_bulk_processing_params_t::on_close() to specify a handler for chain close event. See so-5.5.17: on_close handlers for advanced receive and select functions for more details.
Helper class so_5::mchain_master_handle_t added. See so-5.5.17: mchain_master_handler_t helper class for more details.
Support for GCC v.4.8.2.
New method so_5::disp::mpmc_queue_traits::queue_params_t::next_thread_wakeup_threshold() for tuning the behaviour of thread_pool and adv_thread_pool dispatchers.
Helper functions so_5::create_mchain() added. They simplify creation of size-limited and size-unlimited mchains.
Helper function so_5::auto_join() added. It helps to work with raw std::thread.
Helper function so_5::auto_close_mchains() added. There are also helper functions so_5::auto_close_retain_content() and so_5::auto_close_drop_content().
New functions so_5::select() for handling messages from several mchains added.
New example mchain_select added.
mchain can now be used as MPMC chains. It means that several consumer threads can call so_5::receive() on the same mchain.
New example mchain_multi_consumers added.
New methods so_5::coop_t::size(), so_5::coop_t::capacity() and so_5::coop_t::reserve().
A possibility to implement agent as a hierachical state machine added. See so-5.5 In Depth - Agent States for more details.
New examples added: blinking_led, intercom_statechart and state_deep_history.
Unification of event handler formats for method-style and lambda-style handlers. See so-5.5.14: mhood_t and event handler formats for more details.
New method so_5::mchain_receive_params_t::no_wait_on_empty().
New example producer_consumer_mchain added.
Breaking change: namespace so_5::rt is deprecated! See so-5.5.13: Deprecation of so_5::rt namespace for more details.
Functions send_delayed_to_agent and send_periodic_to_agent are deprecated. See so-5.5.13: Deprecation of send_delayed_to_agent and send_periodic_to_agent for more details.
Another constructor implemented for class so_5::wrapped_env_t. It receives just one argument: an instance of so_5::environment_params_t.
Type name so_5::agent_t::state_t is added. It just an alias for so_5::state_t.
Methods so_5::environment_t::create_local_mbox() are deprecated. Methods so_5::environment_t::create_mbox() must be used instead.
A new mechanism named message chain added. See so-5.5 In Depth - Message Chains for more details.
A performance degradation for local mboxes with large amount of subscribers for one message type is fixed (that degradation was accidentally introduced some versions ago).
New data source for showing quantity of coops waiting for final deregistration added to run-time statistics.
Small modification to output format of msg_tracing messages (format of pointers doesn't depends of compiler now).
A possibility to tune some options for event queue added for dispatchers so_5::disp::thread_pool and so_5::disp::adv_thread_pool. See so-5.5.12: Factories for event queue locks for more details.
Types for parameters for dispatchers now have name disp_params_t (for example so_5::disp::one_thread::disp_params_t or so_5::disp::adv_thread_pool::disp_params_t).
Type for event queues' parameters now have name queue_params_t (for example so_5::disp::one_thread::queue_traits::queue_params_t or so_5::disp::adv_thread_pool::queue_traits::queue_params_t).
A possibility to tune some options for event queue added for dispatchers so_5::disp::one_thread, so_5::disp::active_obj, so_5::disp::active_group, so_5::disp::prio_one_thread::strictly_ordered, so_5::disp::prio_one_thread::quoted_round_robin, so_5::disp::prio_dedicated_threads::one_per_prio. A type of event queue lock can be specified by providing appropriate lock factory (such as so_5::disp::mpsc_queue_traits::combined_lock_factory() and so_5::disp::mpsc_queue_traits::simple_lock_factory());
A possibility to tune options for event queue of the default dispatcher is implemented via so_5::rt::environment_params_t::default_disp_params() method.
A possibility to trace details of message delivery process is added. See so-5.5 In Depth - Message Delivery Tracing for more details.
A possibility to send messages of arbitrary types is added. See so-5.5 In Depth - Messages of Arbitrary Types for more details.
New format of event handlers is supported now. It is R event_handler(T)
for methods of agents or R(T)
for lambda-functions. Event handlers of such format are very useful with messages of arbitrary types.
New helper functions for synchronous agents interaction: so_5::request_future() and so_5::request_value(). See so-5.5.9: New helper functions request_future and request_value for more details.
New format of so_5::send(). Now so_5::send() can accept const reference to so_5::rt::mbox_t, so_5::rt::agent_t and so_5::rt::adhoc_agent_definition_proxy_t. See so-5.5.9: New format of send function for more details.
New class so_5::wrapped_env_t added. See so-5.5.9: New wrapped_env class for more details.
A fix for serious bug: usage of MPSC mbox after the deregistration of the mbox's owner will lead to use of dangling pointer (with unpredicted consequences like application crash).
Pririties for agents and several new dispatchers with priorities support have been added. See so-5.5 In Depth - Priorities of Agents for details.
Another variant of introduce_child_coop and create_child_coop for simplification of child coop creation: so-5.5.8: New form of introduce_child_coop.
New methods of so_5::rt::agent_coop_t for simplification of coop deregistration: so-5.5.8: New methods of agent_coop_t for deregistration.
An ability to define context object for ad-hoc agents added: so-5.5.8: New method make_agent_context for agent_coop_t.
New version of send-family functions: so-5.5.8: Simplification of usage of send-family functions with ad-hoc agents.
More short way for subscribing ad-hoc agents: so-5.5.8: Simpification of ad-hoc agents subscription.
A new variant of so_5::rt::agent_t::limit_then_abort() with pre-abort action: so-5.5.8: New variant of limit_then_abort.
Support for Visual C++ 14.0 (Visual Studio 2015) added.
A small fix for collecting runtime monitoring info in so_5::disp::reuse::work_thread.
A small refactoring of SObjectizer-5 to guarantee that std::abort
will be called when appropriate event in presence of exceptions during error logging.
A new description is added to Doxygen-generated documentation: so-5.5 In Depth - Exceptions.
A new example make_pipeline is added.
A mechanism of message delivery filters is introduced. See so-5.5 In Depth - Message Delivery Filters for more details.
New templates so_5::rt::tuple_as_message_t, so_5::rt::mtag and so_5::rt::typed_mtag added. See so-5.5.5: tuple_as_message for more details.
New helpers so_5::rt::environment_t::introduce_coop() and so_5::rt::introduce_child_coop(). See so-5.5.5: introduce_coop and introduce_child_coop helpers for more details.
A possibility to receive run-time statistics from SObjectizer's internals are introduced. See so-5.5 In Depth - Run-Time Monitoring for more details.
Message limits are supported now. See so-5.5.4: Message Limits for more details.
Another constructor has been added to so_5::rt::agent_t. This constructor receives argument of type so_5::rt::agent_t::context_t. See so-5.5.4: Another constructor for agent_t with context_t argument for more details.
A new conception of private dispatchers has been introduced. See so-5.5.4: Private dispatchers for more details.
Methods so_5::rt::environment_t::make_agent(), so_5::rt::agent_coop_t::make_agent() and so_5::rt::agent_coop_t::make_agent_with_binder() have been introduced. See so-5.5.4: New make_agent methods for more details.
Switching to timertt-1.1.1.
Switching to utest_helpers-1.0.2.
Support for CMake expanded also to the SObjectizer's tests.
Switching to timertt-1.1.0.
A possibility to get ad-hoc agent's direct mbox added via so_5::rt::adhoc_agent_definition_proxy_t::direct_mbox() method. See so-5.5.3: Direct mboxes of ad-hoc agents for more details.
A free function so_5::rt::create_child_coop() has been added for simplification of creation of child cooperations.
A method for tuning subscription handling mechanism has been added (via so_5::rt::agent_t::tuning_options() and so_5::rt::agent_tuning_options_t data structure). See so-5.5.3: Subscription storage type selection for more details.
Several new samples have been added (collector_performer_pair, collector_many_performers, simple_message_deadline, ping_pong_with_owner).
Initial support for CMake added.
Some warnings which are detected at high warning level fixed.
The old name so_5::rt::mbox_ref_t is marked as deprecated. Name mbox_t must be used instead. The old name will remain valid for several future versions of SObjectizer. But it is strongly recommended to use so_5::rt::mbox_t in the new code.
The old name so_5::rt::smart_atomic_reference_t is marked as deprecated. Name so_5::intrusive_ptr_t must be used instead. The old name will remain valid for several future versions of SObjectizer. But it is strongly recommended to use so_5::intrusive_ptr_t in the new code. Also the so_5::atomic_refcounted_t is now moved from namespace so_5::rt to so_5.
A method so_5::rt::agent_t::so_subscribe_self() has been introduced. It is just a shorthand for so_subscrive(so_direct_mbox())
.
A state of an agent can now be changed by several methods. See so-5.5.1: Two new methods for changing an agent state.
A new approach for subscribing an agent's event via so_5::rt::state_t::event() method chain. See so-5.5.1: Subscribing an agent events via state_t::event method.
New overload to simplify subscription for signals. See so-5.5.1: New overloads for agent subscription methods.
New family of free functions introduced to simplify messages and signal sending. See so-5.5.1: New send function family.
Names for new cooperations may be generated automatically. See so-5.5.1: Automatic generation of cooperation names.
Timer-handling methods so_5::rt::environment_t::schedule_timer() and so_5::rt::environment_t::single_timer() now accept std::chrono::duration as arguments. See so-5.5.0: Native support for std::chrono.
Two new functions so_5::launch() are implemeted to be used instead of bunch of so_5::api::run_so_environment() functions.
SObjectizer Environment class renamed to so_5::rt::environment_t. Class with parameters for SObjectizer Environment renamed to so_5::rt::environment_params_t. Old names (so_5::rt::so_environment_t, so_5::rt::so_environment_params_t) kept for backward compatibility.
timertt library is used for timers support. Because of that user has a possibility to select the most appropriate timer mechanism for its application. See so-5.5.0: Timer thread factories for more details.
Because ACE_Logging is no more used new interface, so_5::error_logger_t is introduced. See so-5.5.0: An error_logger interface for more details.
ACE Framework is no more used in SObjectizer core.
New helper header file so_5/api.hpp added. See so-5.4.0: New header file all.hpp.
New method so_5::rt::so_environment_t::add_dispatcher_if_not_exists() is implemeted. It allows to add new dispatcher on running SO Environment. Added dispatcher cannot be removed. See so-5.4.0: A possibility to add a dispatcher after start of SObjectizer Environment.
New helper methods so_5::rt::agent_t::so_deregister_agent_coop() and so_5::rt::agent_t::so_deregister_agent_coop_normally(). See so-5.4.0: Helper methods for cooperation deregistration.
A new feature for SObjectizer Environment: SO Environment is shutting down automatically if there is no more live cooperations. This feature is on by default. To disable it new method so_5::rt::so_environment_params_t::disable_autoshutdown() must be used. See so-5.4.0: Autoshutdown mode for SObjectizer Environment.
New methods so_5::rt::agent_t::so_make_state() introduced to simplify initialization of so_5::rt::state_t objects. See so-5.4.0: New helper method so_make_state of agent_t class.
Two new dispatchers: so_5::disp::thread_pool and so_5::disp::adv_thread_pool. The dispatcher adv_thread_pool can use event handler thread safety information for launching several thread-safe event handlers of one agent on different threads at the same time. See so-5.4.0: New thread_pool dispatcher and so-5.4.0: New adv_thread_pool dispatcher.
A possibility to specify thread safety for event handler. By default all event handlers are not thread safe and SObjectizer is guarantees that those handler will not be called from different threads at the same time. But if event is declared as thread safe then dispatcher is free to launch several thread-safe event handlers at different threads at the same time. See so-5.4.0: thread_safety flag for event handlers.
New sequence of agent to dispatcher binding. Now it is two stage procedure which guaratees that no so_evt_start() is called until all cooperation's agents are bound to dispatchers.
New format of so_5::rt::agent_coop_t::add_agent(). Those methods now return a pointer to agent which has been added to cooperation. See so-5.4.0: New format of add_agent method of agent_coop_t class.
There is no more anonymous agent states. If user doesn't specify name for the state it will be generated automatically. See so-5.4.0: There is no more true anonymous agent's states.
A new type of mbox is introduced: this is multi-producer/single-consumer mbox. That mbox is belonging to the agent. A reference to that mbox can be obtained only by agent_t::so_direct_mbox() method. Anyone can send messages/signals to such mbox, but only the owner can be subscribed to messages from such mbox. See so-5.4.0: New type of mbox -- multi-producer and single-consumer.
Format of so_5::rt::mbox_t::query_name() is changed. Now the std::string object is returned, not the const reference as in previous versions.
A working thread identifier is now stored for every agent and controlled by some operations (like changing agent's state and managing agent's subscriptions).
A new mechanism for event queues are implemented.
Prototypes of methods of so_5::rt::disp_binder_t are changed: now they are received reference to so_5::rt::so_environment_t.
There is no more local event queue for agents. Method so_5::rt::so_environment_params_t::agent_event_queue_mutex_pool_size() is obsolete and marked as deprecated.
New formats and forms of event- and signal-handlers are supported. See so-5.3.0: New event handlers formats for details.
A form of synchronous interaction with agents is introduced. See so-5.3.0: Synchronous interaction with agents for details.
Ad-hoc agents implemented. See so-5.3.0: Ad-hoc agents for details.
Exception reaction for agents and agent cooperation could be inhreited now. See so-5.3.0: Exception reaction inheritance for details.
Several new forms of so_5::api::run_so_environment() added. See so-5.3.0: New run_so_environment() variants for details.
Namespace so_5::chrono_helpers and the function so_5::chrono_helpers::to_ms() added to simplify usage of C++11 std::chrono::duration values.
Methods so_5::rt::agent_t::so_subscribe(), so_5::rt::agent_t::so_drop_subscription() and so_5::rt::agent_t::so_drop_subscription_for_all_states() are made public since v.5.2.3.2.
Class so_5::rt::so_environment_params_t is now moveable (but not copyable).
New exception handling mechanism implemented. An enumeration so_5::rt::exception_reaction_t and method so_5::rt::agent_t::so_exception_reaction() added. Old event_exception_handler_t and related stuff removed. For more details see so-5.2.3: Reaction to unhandled exceptions.
A class so_5::rt::coop_dereg_reason_t added. New namespace with cooperation deregistration reasons enumeration added: so_5::rt::dereg_reason.
Format of so_5::rt::so_environment_t::deregisted_coop() changed. It is necessary to specify reason of cooperation deregistration.
New sample 'coop_user_resources' added.
An ability to store some dynamically allocated user resource inside cooperation is added via so_5::rt::agent_coop_t::take_under_control() method. For more details see so-5.2.3: Cooperation controlled resources.
The so_5::rt::agent_coop_t contructor is now declared as public. It means that it is possible to create classess which are derived from agent_coop_t. The agent_coop_t destructor is protected now. So the only way to work with agent cooperations is create them as dynamically allocated objects and pass pointers to them to so_5::rt::agent_coop_unique_ptr_t wrappers.
New sample 'coop_notification' added.
Demands queues now store agent pointers, not smart references as in previous versions.
so_5::rt::msg_coop_registered and so_5::rt::msg_coop_deregistered added. so_5::rt::make_coop_reg_notificator() and so_5::rt::make_coop_dereg_notificator() added.
so_5::rt::coop_reg_notificator_t and so_5::rt::coop_dereg_notificator_t so_5::rt::agent_coop_t::add_reg_notificator() and so_5::rt::agent_coop_t::add_dereg_notificator() are introduced. See so-5.2.3: Cooperation notifications for more details.
Parent-child relationship added for cooperations. For the details see so-5.2.3: Parent-child cooperation relationship.
Cooperation mutex pool no more used and removed from SObjectizer code. Some related method marked as deprecated and will be removed in future releases.
Method so_5::rt::event_data_t::make_reference added. It returns an instance of so_5::rt::smart_atomic_reference_t<MSG> where MSG is the same type as in event_data_t.
Another overloaded method deliver_message() added to so_5::rt::mbox_t. It accepts so_5::rt::smart_atomic_reference_t<MSG>.
Those changes make possible to resending or storing the same message without copying a message.
Method so_5::rt::smart_atomic_reference_t::reset() added.
Methods so_5::rt::so_environment_t::register_agent_as_coop() added.
Return codes no more used for error reporting in public methods of SObjectizer classes. In case of error an exception is thrown. All stuff related to return codes (e.g. throwing_strategy_t and so on) have been removed. Only exceptions are used now.
Format of so_5::rt::agent_coop_t::add_agent() methods has been changed. Now add_agent() accepts std::unique_ptr and raw so_5::rt::agent_t pointers, not agent_ref_t as in previous versions.
An instance of so_5::rt::so_environment_params_t now is passed to so_5::rt::so_environment_t constructor by rvalue reference, not by const reference as in previous versions.
A template not_null_event_data_t and all related stuff have been removed.
A new base class for all signals (e.g. messages without any data) introduced. Since then all signals classes should be derived from so_5::rt::signal_t.
Special checks for inheritance from so_5::rt::message_t and so_5::rt::signal_t inserted into deliver_message/deliver_signal and schedule_timer methods. Those checks work in compile-time.
Special checks for not-null message pointers inserted into deliver_message and schedult_timer methods. So it is impossible to use those methods to send null messages. Signals should be used for this purpose.
A version of deliver_message for raw message pointer is added (since v.5.2.0.2).
Some changes to message dispatching scheme.
Some refactoring of code inside SObjectizer internals.
All comments in code have been translated to English.
Some small code improvements and refactoring.
Transport layer has been rewritten.
An exception handler/logger facility has been added.
A cooperation listener has been added.
A first version of new generation of SObjectizer.