Skip to content

Commit 0bd85b3

Browse files
authored
Remove internal atomic instances from arrow-core (#126)
* Remove internal atomic instances and atomic-fu from arrow-core Replaced usage in EvalTests by a normal atomic * Remove unsupported op, replace with Java's atomic
1 parent dfd2ef9 commit 0bd85b3

File tree

3 files changed

+4
-115
lines changed

3 files changed

+4
-115
lines changed

arrow-libs/core/arrow-core-data/src/test/kotlin/arrow/core/EvalTest.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import arrow.core.extensions.eval.comonad.comonad
99
import arrow.core.extensions.eval.functor.functor
1010
import arrow.core.extensions.eval.monad.monad
1111
import arrow.core.extensions.fx
12-
import arrow.core.internal.AtomicBooleanW
1312
import arrow.core.test.UnitSpec
1413
import arrow.core.test.concurrency.SideEffect
1514
import arrow.core.test.generators.GenK
@@ -21,6 +20,7 @@ import io.kotlintest.fail
2120
import io.kotlintest.properties.Gen
2221
import io.kotlintest.properties.forAll
2322
import io.kotlintest.shouldBe
23+
import java.util.concurrent.atomic.AtomicBoolean
2424

2525
class EvalTest : UnitSpec() {
2626

@@ -42,13 +42,13 @@ class EvalTest : UnitSpec() {
4242
)
4343

4444
"fx block runs lazily" {
45-
val run = AtomicBooleanW(false)
45+
val run = AtomicBoolean(false)
4646
val p = Eval.fx {
4747
run.getAndSet(true)
48-
run.value
48+
run.get()
4949
}
5050

51-
run.value shouldBe false
51+
run.get() shouldBe false
5252
p.equalUnderTheLaw(just(true), EQK.liftEq(Boolean.eq())) shouldBe true
5353
}
5454

arrow-libs/core/arrow-core/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ plugins {
1212
apply from: "$SUBPROJECT_CONF"
1313
apply from: "$DOC_CONF"
1414
apply from: "$PUBLISH_CONF"
15-
apply plugin: 'kotlinx-atomicfu'
1615

1716
dependencies {
1817
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION"

arrow-libs/core/arrow-core/src/main/kotlin/arrow/core/internal/atomic.kt

-110
This file was deleted.

0 commit comments

Comments
 (0)