Hello, i am using `CircuitBreaker` for some retrying, but i need to start new coroutine in it so i can call suspend function etc. like this
```kotlin
suspend fun <T> retry(
context: Context,
customize: RetryCustomConf? = null,
block: Producer<T>
): T {
val future = circuitBreaker.execute<T> { promise ->
GlobalScope.launch(context.vertx.dispatcher()) {
try {
promise.complete(block()) // promise completion
} catch (exc: Throwable) {
customize?.filter?.let { list ->
list.forEach { filtered ->
if (exc::class.isSubclassOf(filtered).not()) {
unhandledException = exc // this exception should not been handled here
promise.complete() // quit retry loop
}
}
}
customize?.negative_filter?.let { list ->
list.forEach { filtered ->
if (exc::class.isSubclassOf(filtered)) {
unhandledException = exc // this exception should not been handled here
promise.complete() // quit retry loop
}
}
}
throw exc
}
return@launch
}
}
val result = future.await()
unhandledException?.let { throw it } // throw exception after retry loop
return result
}
```
is there some other solution so i dont need use `GlobalScope.launch(context.vertx.dispatcher())` in it?