mdedetrich commented on issue #2093: URL: https://github.com/apache/pekko/issues/2093#issuecomment-3223072996
> > Where is the evidence of this > > 1. The test cases and the result contains less info, that's why the typed actor system's terminate() function just returns a `void`. Test cases don't care about graceful shutdown so this is irrelevant here > 3. When can be retrieved with `whenTerminated`, if care Right, but if you add a blocking `terminated` method as you did in https://github.com/apache/pekko/pull/2096, `whenTerminated` because more annoying to use as you now have to put `terminateAndAwait` inside a `Future` in its own dispatcher/blocking. Terminate is fundamentally an asyc operation, thats why it returns a `Future`. > 4. A user actually cares about `gracefulShutdown`, not when it shuts down, that's why there is a `gracefulShutdown` in Netty's EventLoopGroup.> I know, and graceful shutdown with Akka is done with `terminate`! Now its true that having a shutdown happen so quickly that it concludes before `terminate` finishes is rare, but I have seen it happen. > For these simple cases, we do not need to duplicate another ActorSystem just for Java, really, this `terminate()` call will only be used 1~2 times in your codebase. Agreed, but when I said everywhere I meant the amount of projects, not the amount of times per project. It pretty much should be used 100% of the time once for every project, but there are exceptions > [@mdedetrich](https://github.com/mdedetrich) I like your idea, and that's an idea world, btw, I think we should polish the best UX in Java/Kotlin/Scala. seems you are using Kotlin these days? The trailing lambda is cool, which means some javadsl methods should be rewritten for Kotlin friendly. Yes, and with kotlin you don't use `CompletionStage`/`Future` but rather co-routine with `suspend fun` and as you can see, when I start working on a `kotlindsl` this is going to just end up polluting the `ActorSystem` with methods for every type of dsl we could want to support. When I said what `ActorSystem` is doing here is an exception, I meant it. Also I think its fairly easy to solve this with minimal disruption, the `create()` method would just return an `ActorSystem` from either `java`/`scaladsl` but the source code will be exactly the same as now. You can even do this in a binary compatible way. Please just wait till the end of the week, ill show you what I mean. -- 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]
