asyncSuspend

suspend fun <T, R> <ERROR CLASS><T>.asyncSuspend(f: (T) -> R): R

Resolves the object (e.g. Entity) hidden inside the Acquirable object without blocking. Acquirable are resolved immediately if already reserved for the current thread or resolved on a different thread and the function is executed on it. You should only read/write the currently resolved object in the callback parameter. Do not do anything like accessing fields or methods, do that outside of the callback parameter. If you want to edit multiple Acquirable objects at once, put it into a collection e.g. List, Set, etc. and use Collection#asyncSuspend.

suspend fun <T, R> Collection<<ERROR CLASS><T>>.asyncSuspend(f: (Collection<T>) -> R): R

Resolves the objects (e.g. Entities) hidden inside the Acquirable object without blocking. Acquirable are resolved immediately if already reserved for the current thread or resolved on a different thread and the function is executed on it. You should only read/write the currently resolved object in the callback parameter. Do not do anything like accessing fields or methods, do that outside of the callback parameter.