Skip to content

A library to write easier and more manageable asynchronous code for multi-platform usage.

Notifications You must be signed in to change notification settings

praella-agency/asnycella-kotlin

Repository files navigation

ASYNC-ELLA-kotlin

A library to write easier and more manageable asynchronous code for multi-platform usage.

async {
  someTask()
}

Based on Swift's approach of the asynchronous imperative code, this was implemented into Kotlin for usage in multithread concurrencies. Calling await in the background thread does not freeze the main thread. This library is multiplatform compatible under the KMM module | gradle implementation and exports clean and concise swift code for the iOS application.

Usage

async {
  val multiThreading = await {
    LongAwaitedFunc()
  }
}

Await can also be run in for loops, try/catches and almost anything allowing concurrency. Errors in code, while dispatching async/await can be noticed with the onError modifier

async {
   val dynamicText = await {
      // Exception is thrown in the background thread
   }
   // Process dynamic text ehre
}.onError {
   // Handle exception in main thread
}

About

A library to write easier and more manageable asynchronous code for multi-platform usage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages