The GitHub Actions job "Scalafmt" on 
pekko.git/worktree-fix+stubbed-cancellable-3251 has failed.
Run started by GitHub user He-Pin (triggered by He-Pin).

Head commit for run:
3a43c0670079faa2289e50621de77781735442b2 / 虎鸣 <[email protected]>
refactor: mixin AtomicBoolean into Cancellable to avoid extra field

Motivation:
The previous implementation allocated a separate AtomicBoolean field inside the
anonymous Cancellable. By mixing AtomicBoolean directly into the Cancellable,
the object itself IS the atomic boolean, eliminating the extra allocation.

Modification:
Replace `new Cancellable { val _cancelled = new AtomicBoolean(...) }` with
`new AtomicBoolean(false) with Cancellable`, calling compareAndSet/get directly.

Result:
Cleaner, more idiomatic implementation with one fewer object allocation per
scheduleOnce call.

Tests:
- sbt "actor-testkit-typed / Test / testOnly *BehaviorTestKitSpec 
*BehaviorTestKitTest" - 52 passed, 1 ignored

References:
Refs #3251

Report URL: https://github.com/apache/pekko/actions/runs/28334343028

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to