Should agent_t::so_drop_subscription* methods be marked as noexcept?
eao197 opened this issue · comments
Methods like so_5::agent_t::so_drop_subscription
do not throw exceptions if there is no subscription to be removed.
But these methods do not marked as noexcept. Why?
If this is a historical coincidente then it has to be fixed and these method should be declared as noexcept to make clear that they can be used safely in destructors and catch blocks.
If this is intended then we has to review implementation and try to make them truly noexcept.
The so_5::agent_t::so_drop_subscription*
methods can't be marked as noexcept, because there is a check that a method is called on the agent's worker thread:
sobjectizer/dev/so_5/agent.cpp
Line 994 in 5035f99
This check throws if this is not the case.
But if so_drop_subscription*
is called from the right thread then drop subscription operation can't throw:
sobjectizer/dev/so_5/impl/subscription_storage_iface.hpp
Lines 174 to 183 in 5035f99