raboof commented on code in PR #2176: URL: https://github.com/apache/pekko/pull/2176#discussion_r2328757393
########## actor/src/main/scala/org/apache/pekko/dispatch/VirtualThreadSupport.scala: ########## @@ -67,7 +68,7 @@ private[dispatch] object VirtualThreadSupport { MethodType.methodType(ofVirtualClass, classOf[String], classOf[Long])) // TODO support replace scheduler when we drop Java 8 support val factoryMethod = lookup.findVirtual(builderClass, "factory", MethodType.methodType(classOf[ThreadFactory])) - builder = nameMethod.invoke(builder, prefix + "-virtual-thread-", 0L) + builder = nameMethod.invoke(builder, prefix + "-virtual-thread-", zero) Review Comment: I find it hard to believe the boxing would be a bottleneck/hotspot in the creation of thread factories, but OK I suppose. ########## 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: Does this really make any difference? -- 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-unsubscr...@pekko.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org