CallbackCompletion

interface CallbackCompletion

A mechanism for indicating when a callback Java lambda has completed successfully. By having a Callback invoke this when it's deemed complete instead of coupling it to the time that the lambda function invocation returns, the Java client is free to delegate the responsibility for completing the callback to other Java Threads, such as thread pools, completion mechanisms, coroutines, etc. Each CallbackCompletion must be invoked at most once, and mutually exclusively of the associated CallbackFailure.

It's safe to invoke neither the completion nor failure handler for a callback, and the corresponding fiber will eventually be subject to garbage collection.

Invoking both the completion and failure, or either of them more than once, currently causes all but the first invocation to be ignored.

Functions

Link copied to clipboard
abstract fun complete(result: A_BasicObject)

Invoke this callback success handler.