raboof commented on code in PR #2176:
URL: https://github.com/apache/pekko/pull/2176#discussion_r2329819624
##########
actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala:
##########
@@ -85,15 +86,14 @@ private[dispatch] object VirtualThreadSupport {
val ofVirtualClass =
ClassLoader.getSystemClassLoader.loadClass("java.lang.Thread$Builder$OfVirtual")
val ofVirtualMethod = classOf[Thread].getDeclaredMethod("ofVirtual")
var builder = ofVirtualMethod.invoke(null)
- if (executor != null) {
+ if (executor ne null) {
Review Comment:
Hmm, that's interesting.
Indeed the spec at
https://scala-lang.org/files/archive/spec/3.4/12-the-scala-standard-library.html
seems to say if the left-hand size is not null it should call `equals` on the
left-hand side, but if I actually try it I do get a direct `null` check. I
wonder where/how that's optimized out.
--
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]