Открыть боковую панель
Aurora OS
Kotlin Multiplatform
Libraries
ktor
Коммиты
6b875dd8
Коммит
6b875dd8
создал
Май 28, 2018
по автору
Sergey Mashkov
Просмотр файлов
Upgrade kotlinx.coroutines
владелец
7092c307
Изменения
6
Скрыть пробелы
Построчно
Рядом
gradle.properties
Просмотр файла @
6b875dd8
version
=
0.9.2-SNAPSHOT
kotlin_version
=
1.2.41
coroutines_version
=
0.2
2.5
coroutines_version
=
0.2
3.0-dev-1
dokka_version
=
0.9.16
netty_version
=
4.1.24.Final
...
...
ktor-client/ktor-client-apache/src/io/ktor/client/engine/apache/ApacheHttpRequest.kt
Просмотр файла @
6b875dd8
...
...
@@ -72,8 +72,8 @@ private suspend fun CloseableHttpAsyncClient.sendRequest(
throw
cause
}
continuation
.
invokeOnC
ompletion
(
onCancelling
=
true
)
{
cause
->
cause
?:
return
@invokeOnC
omple
tion
continuation
.
invokeOnC
ancellation
{
cause
->
cause
?:
return
@invokeOnC
ancella
tion
future
.
cancel
(
true
)
parent
.
cancel
(
cause
)
}
...
...
ktor-http-cio/src/io/ktor/http/cio/internals/WeakTimeoutQueue.kt
Просмотр файла @
6b875dd8
...
...
@@ -5,6 +5,7 @@ import kotlinx.coroutines.experimental.internal.*
import
java.time.*
import
kotlin.coroutines.experimental.*
import
kotlin.coroutines.experimental.intrinsics.*
import
kotlin.jvm.*
/**
* It provides ability to cancel jobs and schedule coroutine with timeout. Unlike regular withTimeout
...
...
@@ -80,7 +81,7 @@ class WeakTimeoutQueue(private val timeoutMillis: Long,
c
.
isCompleted
->
suspended
result
is
CompletedExceptionally
->
{
handle
.
dispose
()
throw
result
.
exception
throw
result
.
cause
}
else
->
{
handle
.
dispose
()
...
...
ktor-network/src/io/ktor/network/selector/ActorSelectorManager.kt
Просмотр файла @
6b875dd8
...
...
@@ -8,6 +8,7 @@ import java.nio.channels.*
import
java.util.concurrent.atomic.*
import
kotlin.coroutines.experimental.*
import
kotlin.coroutines.experimental.intrinsics.*
import
kotlin.jvm.*
class
ActorSelectorManager
(
dispatcher
:
CoroutineDispatcher
)
:
SelectorManagerSupport
(),
Closeable
{
@Volatile
...
...
ktor-network/src/io/ktor/network/selector/SelectorManagerSupport.kt
Просмотр файла @
6b875dd8
...
...
@@ -17,7 +17,7 @@ abstract class SelectorManagerSupport internal constructor() : SelectorManager {
suspendCancellableCoroutine
<
Unit
>
{
c
->
// val c = base.tracked() // useful for debugging
c
.
disposeOnCancel
(
selectable
)
c
.
disposeOnCancel
lation
(
selectable
)
selectable
.
suspensions
.
addSuspension
(
interest
,
c
)
if
(!
c
.
isCancelled
)
{
...
...
@@ -141,10 +141,6 @@ abstract class SelectorManagerSupport internal constructor() : SelectorManager {
}
}
internal
fun
CancellableContinuation
<*>.
disposeOnCancel
(
disposableHandle
:
DisposableHandle
)
{
invokeOnCompletion
{
if
(
isCancelled
)
disposableHandle
.
dispose
()
}
}
private
var
SelectionKey
.
subject
:
Selectable
?
get
()
=
attachment
()
as
?
Selectable
set
(
newValue
)
{
...
...
ktor-server/ktor-server-netty/src/io/ktor/server/netty/CIO.kt
Просмотр файла @
6b875dd8
...
...
@@ -53,7 +53,7 @@ private class CoroutineListener<T, F : Future<T>>(private val future: F,
private
val
exception
:
(
Throwable
,
Continuation
<
T
>)
->
Unit
)
:
GenericFutureListener
<
F
>,
DisposableHandle
{
init
{
continuation
.
disposeOnC
omple
tion
(
this
)
continuation
.
disposeOnC
ancella
tion
(
this
)
}
override
fun
operationComplete
(
future
:
F
)
{
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать