@ Deprecated public static < T > Task < T > withSideEffect ( final Task < T > parent , final Task < ? > sideEffect ) { return parent . withSideEffect ( t -> sideEffect ) ; }
Creates a task that will run another task as a side effect once the primary task completes successfully . The side effect will not be run if the primary task fails or is canceled . The entire task is marked done once the base task completes even if the side effect has not been run .