mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
RequestsExecutor.executeAsync(...): Deferred
This commit is contained in:
parent
adb819b0dc
commit
05e0ec704e
@ -24,6 +24,8 @@ must be regular text
|
|||||||
|
|
||||||
### 0.9.2
|
### 0.9.2
|
||||||
|
|
||||||
|
* `RequestsExecutor#executeAsync(Request, CoroutineScope)` now will return `Deferred` for cases when you need result
|
||||||
|
|
||||||
### 0.8.5
|
### 0.8.5
|
||||||
|
|
||||||
* Add extension `String#toMarkdown`
|
* Add extension `String#toMarkdown`
|
||||||
|
@ -164,7 +164,7 @@ fun <T: Any> RequestsExecutor.executeAsync(
|
|||||||
fun <T: Any> RequestsExecutor.executeAsync(
|
fun <T: Any> RequestsExecutor.executeAsync(
|
||||||
request: Request<T>,
|
request: Request<T>,
|
||||||
scope: CoroutineScope = GlobalScope
|
scope: CoroutineScope = GlobalScope
|
||||||
): Job {
|
): Deferred<T> {
|
||||||
return scope.async { execute(request) }
|
return scope.async { execute(request) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user