Skip to content

Commit a6a2757

Browse files
committed
remove some superfluous comments
1 parent 2b4aa27 commit a6a2757

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

libs/internal/include/launchdarkly/async/cancellation.hpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,6 @@
1313
// owns the ability to trigger cancellation, lightweight tokens (derived from
1414
// the source) can be freely passed around, and CancellationCallback provides
1515
// RAII registration of a callback tied to a token.
16-
//
17-
// Significant differences from the C++20 design:
18-
//
19-
// 1. No stop_possible() semantics. C++20's stop_source / stop_token track
20-
// whether any stop_source for the associated state is still alive; if not,
21-
// stop_possible() returns false and stop_callback constructors become
22-
// no-ops. CancellationSource has no such tracking: tokens and callbacks
23-
// behave the same regardless of whether any source is still alive.
24-
//
25-
// 2. Heap-allocated callbacks. C++20's stop_callback<F> stores F inline in
26-
// the callback object to avoid heap allocation. CancellationCallback
27-
// stores its callable inside a Continuation<void()>, which heap-allocates
28-
// via unique_ptr. This avoids a template parameter on CancellationCallback
29-
// at the cost of one allocation per registration.
3016

3117
namespace launchdarkly::async {
3218

@@ -230,11 +216,6 @@ inline CancellationToken CancellationSource::GetToken() const {
230216
// by the callback.
231217
// - CancellationCallback is non-copyable and non-movable, matching C++20's
232218
// stop_callback.
233-
//
234-
// Unlike C++20's stop_callback<F>, CancellationCallback is not a template:
235-
// the callable is accepted as any type that converts to Continuation<void()>,
236-
// and stored heap-allocated inside one. This avoids a template parameter at
237-
// the cost of one allocation per registration.
238219
class CancellationCallback {
239220
public:
240221
CancellationCallback(CancellationToken token, Continuation<void()> cb)

0 commit comments

Comments
 (0)