networking-ts-impl icon indicating copy to clipboard operation
networking-ts-impl copied to clipboard

Question: Under what circumstances timer.cancel() throws?

Open bebuch opened this issue 6 years ago • 0 comments

In the current Networking TS (N4734) basic_waitable_timer::cancel() is not noexcept. Is this because of memory allocation while canceling or was the noexcept simply forgotten?

The question is probably more important for expires_at(). I assume it throws under the same circumstances as cancel(). When calling expires_at() I often know that there are no pending async_wait's. Is it safe to call expires_at() without expecting an exception then? If yes, a hint on that in the TS would be very useful.

I asked a similar question on Stackoverflow.

bebuch avatar Apr 23 '18 10:04 bebuch