Closed soulgen closed 1 year ago
You could use Executors.newSingleThreadExecutor().asCoroutineDispatcher() to avoid IllegalStateException
в 2022 старый добрый асинктаск всё ещё в строю (посмотрел в тирамису - работает)
затаскивать корутины ради корутин - только раздувать приложение если будет время, запилю нормальный ридер на базе этой либы
I tried switching to coroutines in #10, but reverting it back (if you interesting, see commit history for details).
Problem, that we can’t ever have two pages open at the same time. If we simply offload the rendering work to a thread pool (e.g. Dispatchers.IO), we run the risk of trying to open a page in one thread while a different thread is still rendering another one, causing
java.lang.IllegalStateException: Current page not closed
, as explained in that arcticle.Android 12 still have AsyncTask support, so i decided to continue using autor's implementation