sortDataAndExecuteBatch
fun <QueryResultT, DataT, SelectorResultT : Comparable<SelectorResultT>> PreparedQuery<QueryResultT>.sortDataAndExecuteBatch(dataList: List<DataT>, selector: (DataT) -> SelectorResultT, toTuple: DataT.() -> Tuple): Future<QueryResultT>(source)
There can easily be deadlocks when batch-updating data concurrently in multiple event loops if they are overlapped and unsorted.