You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2025/08/01 07:57:17 UTC

[PR] [WIP] avoid sun.misc.Unsafe [pekko]

pjfanning opened a new pull request, #1990:
URL: https://github.com/apache/pekko/pull/1990

   * using VarHandle in more places
   * WIP


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] avoid sun.misc.Unsafe by using VarHandles [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #1990:
URL: https://github.com/apache/pekko/pull/1990#issuecomment-3146381492

   > Need to add `@InternalApi` to `private sealed trait State` when it got changed to `private[pattern] sealed trait State` since `private[pattern]` is ignored from Java, and hence that change made that trait visible to Java users (and they shouldn't be using it since its internal).
   
   I've added the annotation now.


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] avoid sun.misc.Unsafe by using VarHandles [pekko]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #1990:
URL: https://github.com/apache/pekko/pull/1990#discussion_r2248501419


##########
actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala:
##########
@@ -777,7 +769,7 @@ class CircuitBreaker(
   /**
    * Internal state abstraction
    */
-  private sealed trait State {
+  private[pattern] sealed trait State {

Review Comment:
   Changing the visibility of the State trait from `private` to `private[pattern]` appears to be unrelated to the VarHandle migration and could be a breaking change for internal APIs. This change should be documented or moved to a separate commit.
   ```suggestion
     private sealed trait State {
   ```



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] avoid sun.misc.Unsafe by using VarHandles [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #1990:
URL: https://github.com/apache/pekko/pull/1990#discussion_r2248504046


##########
actor/src/main/scala/org/apache/pekko/pattern/CircuitBreaker.scala:
##########
@@ -777,7 +769,7 @@ class CircuitBreaker(
   /**
    * Internal state abstraction
    */
-  private sealed trait State {
+  private[pattern] sealed trait State {

Review Comment:
   this was needed - VarHandle didn't like accessing private classes



-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] avoid sun.misc.Unsafe by using VarHandles [pekko]

Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #1990:
URL: https://github.com/apache/pekko/pull/1990


-- 
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: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org