1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

RequestsExecutor.executeAsync(...): Deferred

This commit is contained in:
InsanusMokrassar 2019-01-31 09:53:58 +08:00
parent adb819b0dc
commit 05e0ec704e
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ must be regular text
### 0.9.2
* `RequestsExecutor#executeAsync(Request, CoroutineScope)` now will return `Deferred` for cases when you need result
### 0.8.5
* Add extension `String#toMarkdown`

View File

@ -164,7 +164,7 @@ fun <T: Any> RequestsExecutor.executeAsync(
fun <T: Any> RequestsExecutor.executeAsync(
request: Request<T>,
scope: CoroutineScope = GlobalScope
): Job {
): Deferred<T> {
return scope.async { execute(request) }
}