You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2023/05/22 12:08:17 UTC

[GitHub] [incubator-pekko-management] mdedetrich commented on a diff in pull request #74: Replace future flatMap + recoverWith combo with transform

mdedetrich commented on code in PR #74:
URL: https://github.com/apache/incubator-pekko-management/pull/74#discussion_r1200425697


##########
lease-kubernetes/src/main/scala/org/apache/pekko/coordination/lease/kubernetes/KubernetesLease.scala:
##########
@@ -66,7 +68,6 @@ class KubernetesLease private[pekko] (system: ExtendedActorSystem, leaseTaken: A
     extends Lease(settings) {
 
   import pekko.pattern.ask
-  import system.dispatcher

Review Comment:
   This was deleted because it ended up being used implicitly in the `.flatMap` cases for `release`/`acquire` which this PR removes. The implicit usage of `system.dispatcher` was likely an oversight, ideally if you are just transforming values you should be using `ExecutionContexts.parasitic` but this was only supplied on `.recoverWith` and forgotten with `.flatMap`



-- 
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-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org