File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
readium/shared/src/main/java/org/readium/r2/shared/util
test-app/src/main/java/org/readium/r2/testapp/utils Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ public class CoroutineQueue(
3131 private val scope: CoroutineScope =
3232 CoroutineScope (dispatcher + SupervisorJob ())
3333
34+ private val tasks: Channel <Task <* >> = Channel (Channel .UNLIMITED )
35+
3436 init {
3537 scope.launch {
3638 for (task in tasks) {
@@ -79,8 +81,6 @@ public class CoroutineQueue(
7981 scope.cancel(cause)
8082 }
8183
82- private val tasks: Channel <Task <* >> = Channel (Channel .UNLIMITED )
83-
8484 private class Task <T >(
8585 val task : suspend () -> T ,
8686 val deferred : CompletableDeferred <T >? = null
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ class CoroutineQueue(
2929 private val scope: CoroutineScope =
3030 CoroutineScope (dispatcher + SupervisorJob ())
3131
32+ private val tasks: Channel <Task <* >> = Channel (Channel .UNLIMITED )
33+
3234 init {
3335 scope.launch {
3436 for (task in tasks) {
@@ -77,8 +79,6 @@ class CoroutineQueue(
7779 scope.cancel(cause)
7880 }
7981
80- private val tasks: Channel <Task <* >> = Channel (Channel .UNLIMITED )
81-
8282 private class Task <T >(
8383 val task : suspend () -> T ,
8484 val deferred : CompletableDeferred <T >? = null
You can’t perform that action at this time.
0 commit comments