CSHasContext

interface CSHasContext : CSEventOwnerHasDestroy

Functions

Link copied to clipboard
open fun later(function: () -> Unit): CSRegistration

open fun later(delayMilliseconds: Int, function: () -> Unit): CSRegistration

later should be here instead of extension so Any.later is not called by mistake There is strange issue where postOnMain invokes immediately for unknown reason, so this was rewritten to not fail, even 5ms caused issue on some device so..

Link copied to clipboard
abstract fun onDestroy()
Link copied to clipboard
open fun <T : Any> T.onMain(function: T.() -> Unit): CSRegistration?

onMain uses later(5) due to one strange rare multithreading issue where later function where executed earlier then later returned registration

Properties

Link copied to clipboard
abstract val context: Context
Link copied to clipboard
abstract val eventDestroy: CSEvent<Unit>
Link copied to clipboard
abstract val registrations: CSRegistrations

Inheritors

Link copied to clipboard