pjfanning commented on code in PR #485:
URL: https://github.com/apache/incubator-pekko/pull/485#discussion_r1465279734


##########
actor/src/main/scala/org/apache/pekko/dispatch/ForkJoinExecutorConfigurator.scala:
##########
@@ -84,12 +85,28 @@ class ForkJoinExecutorConfigurator(config: Config, 
prerequisites: DispatcherPrer
   class ForkJoinExecutorServiceFactory(
       val threadFactory: ForkJoinPool.ForkJoinWorkerThreadFactory,
       val parallelism: Int,
-      val asyncMode: Boolean)
+      val asyncMode: Boolean,
+      val maxPoolSize: Int)
       extends ExecutorServiceFactory {
+
+    def this(threadFactory: ForkJoinPool.ForkJoinWorkerThreadFactory,
+        parallelism: Int,
+        asyncMode: Boolean) = this(threadFactory, parallelism, asyncMode, 
ForkJoinPoolConstants.MaxCap)
+
+    private lazy val pekkoJdk9ForkJoinPoolClassOpt: Option[Class[_]] =
+      
Try(Class.forName("org.apache.pekko.dispatch.PekkoJdk9ForkJoinPool")).toOption

Review Comment:
   Looking at this again on my phone - it will probably be ok. Looks the same 
as existing code with an additional jdk version check. The existing code works 
- it just relies n checking if a class loads ok.. In the full lifetime of the 
JVM we will try to class load once.. Java 8 users who only ever create one 
dispatcher will see a small perf boost. Everyone else will see a perf decrease 
because of the extra if check on every dispatcher create call.



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

Reply via email to