Commit 72c9246 1 parent 4b78782 commit 72c9246 Copy full SHA for 72c9246
File tree 3 files changed +8
-13
lines changed
arrow-fx-coroutines/src/main/kotlin/arrow/fx/coroutines
3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -16,20 +16,14 @@ jobs:
16
16
- uses : actions/checkout@v1
17
17
- name : Validate Gradle Wrapper
18
18
uses : gradle/wrapper-validation-action@v1
19
- - name : Cache management
20
- uses : actions/cache@v2
21
- with :
22
- path : ~/.gradle/caches
23
- key : ${{ runner.os }}--gradle--${{ hashFiles('**/*.gradle*') }}
24
- restore-keys : |
25
- ${{ runner.os }}--gradle--
26
19
- name : Checkout orchestrator
27
20
run : |
28
21
cd $BASEDIR
29
22
git clone https://github.com/arrow-kt/arrow.git
30
23
- name : Build with Gradle
31
24
run : |
32
- $BASEDIR/arrow/scripts/project-build.sh $ARROW_LIB
25
+ ./gradlew build
26
+ #$BASEDIR/arrow/scripts/project-build.sh $ARROW_LIB
33
27
# - name: Run benchmark for master branch
34
28
# run: |
35
29
# git checkout master
44
38
# run: |
45
39
# export PULL_REQUEST_NUMBER=$(echo $GITHUB_REF | cut -d/ -f3)
46
40
# ./gradlew :arrow-benchmarks-fx:compareBenchmarksCI
47
- - name : Clean SNAPSHOTs
48
- run : |
49
- find ~/.gradle/caches/ -type d -name "*SNAPSHOT*" -prune -exec rm -rf {} +
Original file line number Diff line number Diff line change @@ -3,7 +3,10 @@ package arrow.fx.coroutines
3
3
import kotlinx.atomicfu.AtomicRef
4
4
import kotlinx.atomicfu.atomic
5
5
import kotlin.coroutines.AbstractCoroutineContextElement
6
+ import kotlin.coroutines.Continuation
6
7
import kotlin.coroutines.CoroutineContext
8
+ import kotlin.coroutines.EmptyCoroutineContext
9
+ import kotlin.coroutines.startCoroutine
7
10
8
11
/* *
9
12
* Inline marker to mark a [CancelToken],
@@ -83,7 +86,8 @@ internal sealed class SuspendConnection : AbstractCoroutineContextElement(Suspen
83
86
84
87
override tailrec fun push (token : CancelToken ): Unit = when (val list = state.value) {
85
88
// If connection is already cancelled cancel token immediately.
86
- null -> Platform .unsafeRunSync { token.invoke() }
89
+ null -> token.cancel
90
+ .startCoroutine(Continuation (EmptyCoroutineContext ) { })
87
91
else ->
88
92
if (state.compareAndSet(list, listOf (token) + list)) Unit
89
93
else push(token)
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ SUBPROJECT_CONF=https://raw.githubusercontent.com/arrow-kt/arrow/master/subproje
5
5
DOC_CONF =https://raw.githubusercontent.com/arrow-kt/arrow/master/doc-conf.gradle
6
6
PUBLISH_CONF =https://raw.githubusercontent.com/arrow-kt/arrow/master/publish-conf.gradle
7
7
# Gradle options
8
- org.gradle.jvmargs =-Xmx7g
8
+ org.gradle.jvmargs =-Xmx4g
9
9
org.gradle.parallel =true
10
10
# Kotlin configuration
11
11
kotlin.incremental =true
You can’t perform that action at this time.
0 commit comments