pjfanning commented on code in PR #2046:
URL: https://github.com/apache/pekko/pull/2046#discussion_r2294005656


##########
actor/src/main/scala/org/apache/pekko/dispatch/Dispatcher.scala:
##########
@@ -64,16 +64,20 @@ class Dispatcher(
     new 
LazyExecutorServiceDelegate(executorServiceFactoryProvider.createExecutorServiceFactory(id,
 threadFactory))
 
   protected final def executorService: ExecutorServiceDelegate = 
executorServiceDelegate
+  protected final def isVirtualized: Boolean = 
executorServiceFactoryProvider.isVirtualized
 
   /**
    * INTERNAL API
    */
   protected[pekko] def dispatch(receiver: ActorCell, invocation: Envelope): 
Unit = {
     val mbox = receiver.mailbox
     mbox.enqueue(receiver.self, invocation)
-    registerForExecution(mbox, true, false)
+    registerForExecution(mbox, hasMessageHint = true, hasSystemMessageHint = 
false)
   }
 
+  final override def batchable(runnable: Runnable): Boolean =
+    if (isVirtualized) true else super.batchable(runnable)

Review Comment:
   the PR title says 'disable batch if isVirtualized' but this seems to be the 
opposite



-- 
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

Reply via email to