Closed Reco1I closed 2 months ago
In this PR I replace all SyncTaskManager.class and Async.class usages to use Execution alternatives with Kotlin coroutines for asynchronous tasks. That is the composition of the replacements wil be this:
SyncTaskManager.class
Async.class
Execution
SyncTaskManager.run() -> Execution.updateThread()
SyncTaskManager.run()
Execution.updateThread()
MainActivity.runOnUpdateThread() -> Execution.updateThread()
MainActivity.runOnUpdateThread()
MainActivity.runOnUiThread() -> Execution.mainThread()
MainActivity.runOnUiThread()
Execution.mainThread()
Note: Any task that should be done in update thread it's preferable to use Scene.postRunnable() whenever it's posible..
Scene.postRunnable()
In Kotlin they can be accessed without class qualifier:
mainThread { }
updateThread { }
In this PR I replace all
SyncTaskManager.class
andAsync.class
usages to useExecution
alternatives with Kotlin coroutines for asynchronous tasks. That is the composition of the replacements wil be this:SyncTaskManager.run()
->Execution.updateThread()
MainActivity.runOnUpdateThread()
->Execution.updateThread()
MainActivity.runOnUiThread()
->Execution.mainThread()
Note: Any task that should be done in update thread it's preferable to use
Scene.postRunnable()
whenever it's posible..In Kotlin they can be accessed without class qualifier:
mainThread { }
updateThread { }