mdedetrich commented on code in PR #2176:
URL: https://github.com/apache/pekko/pull/2176#discussion_r2329826824
##########
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:
Indeed I thought it was the same but `ne` is faster as it doesn't have to
check as many things.
Not sure if it's a bottleneck and/or if JVM optimises it out but if @He-Pin
finds something it's usually because it's being hit somewhere
--
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]