Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

basic exception storing and rethrow in pool_runner_t #69

Closed prince-chrismc closed 4 years ago

prince-chrismc commented 4 years ago

This feature is tagged v0.7.0 but maybe this can be merged into your v0.6-dev as an incremental improvement.

The pool runner is much cleaner than a call to run but the lack of exception handling is a show stopper.

Hope this PR can help.

eao197 commented 4 years ago

Hi, Chris.

Thanks for your PR, but it can't be accepted for 0.6.* because storing and rethrowing exceptions breaks compatibility. User code written with RESTinio-0.6 doesn't expect that stop(), stopped() and wait() can throw. Maybe those methods are called somewhere in destructors and changing their behavior may lead to call of std::terminate() in users' applications.

That is why such changes weren't made for the 0.6-branch and marked for v.0.7 where we can break compatibility with v.0.6.

We don't like to break compatibility because it disturbs users and increases maintenance works for us (because some users stay at the oldest versions and can't switch, so sometimes we have to support them with the oldest versions of RESTinio). We break compatibility only if there is no other way to add some important functionality (like it was for v.0.5.0 and v.0.6.0).

At this moment we have no plans to start work on v.0.7 because there are some wishes that (I hope) can be implemented in 0.6-branch without breaking compatibility and disturbing existing users of RESTinio.

prince-chrismc commented 4 years ago

That is absolutely perfect argument.

If this PR can't be merge in the near future, feel free to close it =)