代码拉取完成,页面将自动刷新
rotor
is event loop friendly C++ actor micro framework,
github
gitee
inter-thread messaging (1) | cross-thread messaging (2) |
---|---|
~18.3M messages/second | ~ 2.5M messages/second |
Setup: Intel Core i7-8550U, Void Linux 5.13.
(1) Backend-independent; Can be measured with examples/boost-asio/ping-pong-single-simple
, examples/ev/ping-pong-ev
.
(2) Does not apply to wx-backend; can be measured with examples/thread/ping-pong-thread
,
examples/boost-asio/ping-pong-2-theads
, examples/ev/ping-pong-ev-2-threads
.
MIT
Please read tutorial, design principles and manual here
static_assert
for noexcept
check of a hanler signatureev
backendstd::thread
, boost-asio
and ev
backends (upto 5x times)extended_error
can now access to root reasonsystem_context
)examples/thread/ping-pong-thread.cpp
(new)examples/ev/ping-pong-ev-2-threads
(new)lifetime_plugin_t
do not unsubscribe from foreign to me subscriptionsforeigners_support_plugin_t
more safely deliver a message for a foreign
subscriber (actor)address_maker
pluginactor::do_shutdown()
- optionally takes shutdown reasonstd::error_code
the extended_error
class
is used. It wraps std::error_code
, provides string context and pointer to the next
extended_error
cause. This greatly simplfies error tracking of errors. Every response
now contains ee
field instead of ec
.actor
has shutdown reason (in form of extended_error
pointer)on_unlink
method to get it know, when it has been
unlinked from server actorresources
plugin for supervisorextended_error
pointer instread of std::error_code
shutdown_request_t
and shutdown_trigger_t
messages how have
shutdown reason (in form of extended_error
pointer)link_client_plugin_t
do not invoke custom callback, before erasing request
in case of failurechild_manager_plugin_t
reactivate self if a child was created from other
plugin.registy actor
incorrectly resolves postponed requests to wrong addressesstate_response_t
has been removedresources_plugin_t
, during
other plugin configurationstd::thread
backend (supervisor)examples/thread/sha512.cpp
(new)Event loops & platforms
Patterns
with Blocking I/O multiplexing
Advanced examples
,make_response
methods when message should be created, but
send later delayedexamples/boost-asio/ping-pong-timer.cpp
(new)examples/boost-asio/beast-scrapper.cpp
(updated)actor_config_t
was introduced, which now holds pointer to
supervisor, init and shutdown timeoutsbuilder
pattern was introduced to simplify actors constructionsupervisor_config_t
was changed (inherited from actor_config_t
)actor_base_t
and supervisor_t
constructors has changed - now
appropriate config is taken as single parameter. All descendant classes should
be changedconfig_t
inside the class, and templated config_builder_t
.supervisor_ev_t
not always correctly released EV-resources, which
lead to leakactor_base_t
can be shutted down properly even if it did not
started yetrotor::supervisor_t
and rotor::asio::supervisor_asio_t
rotor::asio::forwarder_t
now more correctly dispatches
boost::asio
events to actor methods; e.g. it works correctly now with
async_accept
method of socket_acceptor
supervisor_policy_t
was introduced to control supervisor
behavior on a child-actor startup failureexamples/ev/pong-registry.cpp
how to use registryrotor::arc_base
, to allow
forwarding requests without copying it (i.e. just intrusive pointer is created)examples/boost-asio/beast-scrapper.cpp
has been added; it
demonstrates an app with pool of actor workers with request-response forwardingsupervisor_config_t
,
which contains shutdown timeout valuecreate_actor
method now takes child max
init time value. If it does not confirm, the child actor will be asked
for shut down.message::shutdown_request_t
message::init_request_t
message::state_request_t
,
which follows the generic request/response pattern. The response type
is now message::state_response_t
.outbound
field in rotor::supervisor_t
was renamed just to queue
rotor::address_t
now contains const void*
localityrotor::asio::supervisor_config_t
now contains
std::shared_ptr
to strand
, instead of creating private strand
for each supervisordo_start()
method in rotor::supervisor_t
was
removed, since supervisor now is able to start self after compliting
initialization.rotor::supervisor_t
sends initialize_actor_t
to self
to advance own state to INITIALIZED
via common actor mechanism,
instead of changeing state directly on early initialization phase
(do_initialize
)rotor::asio::forwarder_t
now more correctly dispatches
boost::asio events to actor methodsrotor::ev::supervisor_ev_t
properly handles refcounterInitial version
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。