Fixed
Status Update
Comments
ad...@google.com <ad...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 2c0e6605f14ebf6732de732033bd2c424ebbc436
Author: Adam Powell <adamp@google.com>
Date: Thu Feb 29 13:05:05 2024
Remove SuspendToFutureAdapter root Job
Manually specify the internal root CoroutineScope of
SuspendToFutureAdapter to avoid the default Job added by the
CoroutineScope factory function.
Test: SuspendToFutureAdapterTest.launchAfterFailedFuture
Fixes: 327629504
Change-Id: I0e4052329d6e330cd23b970f826cf8035e495996
M concurrent/concurrent-futures-ktx/src/main/java/androidx/concurrent/futures/SuspendToFutureAdapter.kt
M concurrent/concurrent-futures-ktx/src/test/java/androidx/concurrent/futures/SuspendToFutureAdapterTest.kt
https://android-review.googlesource.com/2982003
Branch: androidx-main
commit 2c0e6605f14ebf6732de732033bd2c424ebbc436
Author: Adam Powell <adamp@google.com>
Date: Thu Feb 29 13:05:05 2024
Remove SuspendToFutureAdapter root Job
Manually specify the internal root CoroutineScope of
SuspendToFutureAdapter to avoid the default Job added by the
CoroutineScope factory function.
Test: SuspendToFutureAdapterTest.launchAfterFailedFuture
Fixes: 327629504
Change-Id: I0e4052329d6e330cd23b970f826cf8035e495996
M concurrent/concurrent-futures-ktx/src/main/java/androidx/concurrent/futures/SuspendToFutureAdapter.kt
M concurrent/concurrent-futures-ktx/src/test/java/androidx/concurrent/futures/SuspendToFutureAdapterTest.kt
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha03
Description
When SuspendToFuturesAdapter is used to on a suspend function which throws exceptions, the first exception causes all further uses of the SuspendToFuturesAdapter to trigger an exception related to the parent job being canceled.
Context:https://github.com/google/generative-ai-android/issues/69
https://github.com/google/generative-ai-android/blob/main/generativeai/src/main/java/com/google/ai/client/generativeai/java/ChatFutures.kt#L54