jxtps commented on issue #1708: URL: https://github.com/apache/pekko/issues/1708#issuecomment-2590607481
Yes, I have had to switch to using a custom ForkJoinPool. But regardless, if you look at the code where this happens ( https://github.com/apache/pekko/blob/main/actor/src/main/scala/org/apache/pekko/dispatch/BatchingExecutor.scala#L104 ): ```scala override final def run(): Unit = { require(_tasksLocal.get eq null) _tasksLocal.set(this) // Install ourselves as the current batch val firstInvocation = _blockContext.get eq null if (firstInvocation) _blockContext.set(BlockContext.current) BlockContext.withBlockContext(this) { try processBatch(this) catch { case t: Throwable => resubmitUnbatched() throw t } finally { _tasksLocal.remove() if (firstInvocation) _blockContext.remove() } } } ``` What happens is that `require(_tasksLocal.get eq null)` fails, which makes it look like there's a race condition happening? And regardless of use, that should be made to be not possible, right? Or maybe I'm misunderstanding how this is supposed to work, but my code "just" does `ForkJoinPool.invokeAll`, which should always be legal, no? -- 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