Update linter
This commit is contained in:
@@ -95,7 +95,7 @@ private suspend fun AndroidDatabaseHandler.createTransactionContext(): Coroutine
|
||||
* thread by cancelling the job.
|
||||
*/
|
||||
private suspend fun CoroutineDispatcher.acquireTransactionThread(
|
||||
controlJob: Job
|
||||
controlJob: Job,
|
||||
): ContinuationInterceptor {
|
||||
return suspendCancellableCoroutine { continuation ->
|
||||
continuation.invokeOnCancellation {
|
||||
@@ -116,8 +116,8 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread(
|
||||
// Couldn't acquire a thread, cancel coroutine.
|
||||
continuation.cancel(
|
||||
IllegalStateException(
|
||||
"Unable to acquire a thread to perform the database transaction.", ex
|
||||
)
|
||||
"Unable to acquire a thread to perform the database transaction.", ex,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ private suspend fun CoroutineDispatcher.acquireTransactionThread(
|
||||
*/
|
||||
private class TransactionElement(
|
||||
private val transactionThreadControlJob: Job,
|
||||
val transactionDispatcher: ContinuationInterceptor
|
||||
val transactionDispatcher: ContinuationInterceptor,
|
||||
) : CoroutineContext.Element {
|
||||
|
||||
companion object Key : CoroutineContext.Key<TransactionElement>
|
||||
|
||||
Reference in New Issue
Block a user