Skip to content

Commit aa86ff3

Browse files
committed
Revert "BlockHound integration (#1821)"
This reverts commit ed7c668.
1 parent 6802f7b commit aa86ff3

File tree

21 files changed

+65
-276
lines changed

21 files changed

+65
-276
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ apply from: rootProject.file("gradle/experimental.gradle")
88
def rootModule = "kotlinx.coroutines"
99
def coreModule = "kotlinx-coroutines-core"
1010
// Not applicable for Kotlin plugin
11-
def sourceless = ['kotlinx.coroutines', 'site', 'kotlinx-coroutines-bom', 'integration-testing']
12-
def internal = ['kotlinx.coroutines', 'site', 'benchmarks', 'js-stub', 'stdlib-stubs', 'integration-testing']
11+
def sourceless = ['kotlinx.coroutines', 'site', 'kotlinx-coroutines-bom', 'publication-validator']
12+
def internal = ['kotlinx.coroutines', 'site', 'benchmarks', 'js-stub', 'stdlib-stubs', 'publication-validator']
1313
// Not published
1414
def unpublished = internal + ['example-frontend-js', 'android-unit-tests']
1515

gradle.properties

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ knit_version=0.1.3
1414
html_version=0.6.8
1515
lincheck_version=2.5.3
1616
dokka_version=0.9.16-rdev-2-mpp-hacks
17-
byte_buddy_version=1.10.7
17+
byte_buddy_version=1.9.3
1818
reactor_vesion=3.2.5.RELEASE
1919
reactive_streams_version=1.0.2
2020
rxjava2_version=2.2.8
2121
javafx_version=11.0.2
2222
javafx_plugin_version=0.0.8
2323
binary_compatibility_validator_version=0.2.2
24-
blockhound_version=1.0.2.RELEASE
25-
jna_version=5.5.0
2624

2725
# Android versions
2826
android_version=4.1.1.4

integration-testing/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

integration-testing/build.gradle

Lines changed: 0 additions & 77 deletions
This file was deleted.

integration-testing/src/debugAgentTest/kotlin/DebugAgentTest.kt

Lines changed: 0 additions & 20 deletions
This file was deleted.

kotlinx-coroutines-core/jvm/src/scheduling/CoroutineScheduler.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -951,20 +951,3 @@ internal class CoroutineScheduler(
951951
TERMINATED
952952
}
953953
}
954-
955-
/**
956-
* Checks if the thread is part of a thread pool that supports coroutines.
957-
* This function is needed for integration with BlockHound.
958-
*/
959-
@Suppress("UNUSED")
960-
@JvmName("isSchedulerWorker")
961-
internal fun isSchedulerWorker(thread: Thread) = thread is CoroutineScheduler.Worker
962-
963-
/**
964-
* Checks if the thread is running a CPU-bound task.
965-
* This function is needed for integration with BlockHound.
966-
*/
967-
@Suppress("UNUSED")
968-
@JvmName("mayNotBlock")
969-
internal fun mayNotBlock(thread: Thread) = thread is CoroutineScheduler.Worker &&
970-
thread.state == CoroutineScheduler.WorkerState.CPU_ACQUIRED

kotlinx-coroutines-debug/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ suspension stacktraces.
1313
Additionally, it is possible to process the list of such coroutines via [DebugProbes.dumpCoroutinesInfo] or dump isolated parts
1414
of coroutines hierarchy referenced by a [Job] or [CoroutineScope] instances using [DebugProbes.printJob] and [DebugProbes.printScope] respectively.
1515

16-
This module also provides an automatic [BlockHound](https://github.com/reactor/BlockHound) integration
17-
that detects when a blocking operation was called in a coroutine context that prohibits it. In order to use it,
18-
please follow the BlockHound [quick start guide](
19-
https://github.com/reactor/BlockHound/blob/1.0.2.RELEASE/docs/quick_start.md).
20-
2116
### Using in your project
2217

2318
Add `kotlinx-coroutines-debug` to your project test dependencies:

kotlinx-coroutines-debug/api/kotlinx-coroutines-debug.api

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ public final class kotlinx/coroutines/debug/CoroutineInfo {
88
public fun toString ()Ljava/lang/String;
99
}
1010

11-
public final class kotlinx/coroutines/debug/CoroutinesBlockHoundIntegration : reactor/blockhound/integration/BlockHoundIntegration {
12-
public fun <init> ()V
13-
public fun applyTo (Lreactor/blockhound/BlockHound$Builder;)V
14-
}
15-
1611
public final class kotlinx/coroutines/debug/DebugProbes {
1712
public static final field INSTANCE Lkotlinx/coroutines/debug/DebugProbes;
1813
public final fun dumpCoroutines (Ljava/io/PrintStream;)V

kotlinx-coroutines-debug/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ dependencies {
2222
compileOnly "junit:junit:$junit_version"
2323
shadowDeps "net.bytebuddy:byte-buddy:$byte_buddy_version"
2424
shadowDeps "net.bytebuddy:byte-buddy-agent:$byte_buddy_version"
25-
compileOnly "io.projectreactor.tools:blockhound:$blockhound_version"
26-
testCompile "io.projectreactor.tools:blockhound:$blockhound_version"
27-
runtime "net.java.dev.jna:jna:$jna_version"
28-
runtime "net.java.dev.jna:jna-platform:$jna_version"
2925
}
3026

3127
jar {
@@ -39,5 +35,5 @@ shadowJar {
3935
classifier null
4036
// Shadow only byte buddy, do not package kotlin stdlib
4137
configurations = [project.configurations.shadowDeps]
42-
relocate('net.bytebuddy', 'kotlinx.coroutines.repackaged.net.bytebuddy')
38+
relocate 'net.bytebuddy', 'kotlinx.coroutines.repackaged.net.bytebuddy'
4339
}

kotlinx-coroutines-debug/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)