Changelog History
-
v1.2.35 Changes
September 17, 2020kotlin 1.4.10
coroutines-android 1.3.9 -
v1.2.33 Changes
June 27, 2020with kotlin 1.3.72
coroutines-android 1.3.6
module migrates to kotlin gradle dsl -
v1.2.31 Changes
November 25, 2019๐ Change function names in
IAsyncTasksManager.kt
:doTryCatchWithAsync
todoWithTryCatchAsync
doTryCatchFinallyWithAsync
todoWithTryCatchFinallyAsync
doTryFinallyWithAsync
todoWithTryFinallyAsync
-
v1.2.30 Changes
November 25, 2019๐ New function with optional parameters:
ICoroutinesManager.kt
:- launchOnUiBy
- launchOnUiAsyncBy
IAsyncTasksManager.kt
:- doAsyncAwaitBy
- doWithAsyncAwaitBy
-
v1.2.21 Changes
November 20, 2019โ Added new functionality to
IAsyncTasksManager.kt
using withContext(asyncCoroutineContext):doWithAsync
doTryCatchWithAsync
doTryCatchFinallyWithAsync
doTryFinallyWithAsync
-
v1.2.1 Changes
November 07, 2019โ Added
asyncSupervisorJob
inCoroutinesProvider.kt
forIAsyncTasksManager.kt
-
v1.2.0 Changes
November 07, 2019๐จ Many refactoring and changes
ICoroutinesManager : IAsyncTasksManager
and you can call any async methods insidelaunchOnUI
Example:class MyCoroutinesWorker : ICoroutinesManager {fun onRepeateButtonClickListener() = launchOnUITryCatchFinally( tryBlock = {val result = doTryCatchAsyncAwait( tryBlock = { println("----> ASYNC 'TRY' BLOCK") delay(3000L) "OPERATION COMPLETE" }, catchBlock = { println("----> ASYNC 'CATCH' BLOCK") throw it } ) }, catchBlock = { // Catch an Error on UI with it }, finallyBlock = { // final block }) }
lazy initialization of Dispatcher in
CoroutinesProvider.kt
0๏ธโฃ default
cancelationHandlersSet
inCoroutinesProvider.kt
andICoroutinesManager
can handle cancelation tooval ICoroutinesManager.isCancelled: Boolean
andval ICoroutinesManager.isCompleted: Boolean
๐ท
fun ICoroutinesManager.cancelAllCoroutines()
- cancel all coroutines with async and UI jobsreplace
var wasCancelled: Boolean
fromIAsyncTasksManager.kt
byval IAsyncTasksManager.isCancelled: Boolean
You can launch async task without calling
launchOnUI
with new functions:launchOnUIAsyncAwait
launchOnUITryCatchAsyncAwait
launchOnUITryCatchFinallyAsyncAwait
launchOnUITryFinallyAsyncAwait
๐ท Block try always will be called on Async Job
๐ Documentation added and example changed
๐ฑ โค๏ธ Coroutines -
v1.1.3 Changes
September 10, 2019โ Add
job
to constructor properties ofAsyncTaskManager.kt
andCoroutinesTaskManager.kt
Kotlin version 1.3.50 -
v1.1.2 Changes
July 18, 2019๐ Changed returning type of
fun ICoroutinesManager.launchOnUI
to Unit -
v1.1.1 Changes
July 18, 2019๐ Full API refactor. Major release version
๐ Changed function naming and added much more new functionality toIAsyncTaskManager.kt
:- doTryCatchAsync
- doTryCatchFinallyAsync
- doTryFinallyAsync
And await function that returns a response value from try... blocks
Now finally block (CoroutineScope.(Throwable?) -> T) contains error as nullable parameter. If there is some error in coroutine it also passes into finally block too