He-Pin opened a new pull request, #3116:
URL: https://github.com/apache/pekko/pull/3116

   ### Motivation
   
   PR #3035 introduced a VarHandle-backed volatile `Int` for `LazyDispatch` 
election state. Review raised concern that the field appears unused to normal 
bytecode/tooling because it is only accessed through the handle.
   
   ### Modification
   
   Replace the VarHandle-backed state with an `AtomicInteger`.
   
   This keeps the same IDLE/SCHEDULED `get` / `set` / `compareAndSet` protocol 
while avoiding reflective field access and Scala 3 VarHandle 
signature-polymorphic call-site handling.
   
   ### Result
   
   `LazyDispatch` keeps the same scheduling behavior with simpler state 
management and no private field retention concern.
   
   ### Tests
   
   - `scalafmt --mode diff-ref=origin/main --non-interactive`
   - `scalafmt --list --mode diff-ref=origin/main --non-interactive`
   - `sbt "stream / compile"`
   - `sbt "stream-tests / Test / testOnly 
org.apache.pekko.stream.scaladsl.StageActorRefSpec"` - 11/11
   - `sbt "+stream / compile"`
   - `sbt "stream / mimaReportBinaryIssues"`
   - `git diff --check`
   
   ### References
   
   Refs #3035
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to