Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
renetik committed Jun 22, 2024
1 parent 81b0ac8 commit cfddb74
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import renetik.android.event.property.CSProperty.Companion.property
import renetik.android.event.registration.CSRegistration.Companion.CSRegistration
import kotlin.Result.Companion.success

//suspend fun <T> CSHasChangeValue<T>.waitFor(condition: (T) -> Boolean) {
// while (!condition(value)) waitForChange()
//}

suspend fun <T> CSHasChangeValue<T>.waitFor(condition: (T) -> Boolean) {
if (!condition(value)) suspendCancellableCoroutine { coroutine ->
var registration: CSRegistration? = null
Expand Down

0 comments on commit cfddb74

Please sign in to comment.