Accepts reference to agent_coop_t as parent coop.
Something like:
// Wanted: env.introduce_coop( []( so_5::rt::agent_coop_t & coop ) { coop.define_agent(). .event< some_signa >( some_mbox, [&coop] { coop.deregister_normally(); } ); ... } ); // Instead of: env.introduce_coop( []( so_5::rt::agent_coop_t & coop ) { coop.define_agent(). .event< some_signa >( some_mbox, [&coop] { coop.environment().deregister_coop( coop.query_coop_name(), so_5::rt::dereg_reason::normal ); } ); ... } );
Those function accept ad_hoc_agent_wrapper_t reference as a parameter for send_to_agent, send_delayed_to_agent and so on.
Check for support of noexcept keyword in MSVS2015.
A trick with block on condition during handling evt_start-demand should be used instead.
Subscription in agent constructor should be allowed.
An overloaded version om limit_then_abort which can accept lambda-function. This lambda will be called before std::abort(). It allows to do some application-specific logging.
Calls to std::rand in tests and examples must be changed to something from C++11.
Implementation with std::deque has move higher performance. Probably because there is less memory allocation-deallocation operations involved.
This allows to write more compact code for ad-hoc agent. For comparison:
// Now: auto a = coop.define_agent( coop.make_agent_context() + priority + so_5::rt::agent_t::limit_then_abort< generation_request >( 1 ) + so_5::rt::agent_t::limit_then_drop< ask_for_work >( 1 ) ); // Could be: auto a = coop.define_agent( coop.make_agent_context() + priority + so_5::limit_then_abort< generation_request >( 1 ) + so_5::limit_then_drop< ask_for_work >( 1 ) );
It wont be compiled under GCC 4.9/5.1