-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not detected call to Files.readString(path)
#192
Comments
Hey @pmendelski,
You can verify it by changing /cc @simonbasle |
Thanks for such a fast answer. I added logs and tried public static void main(String[] args) throws ExecutionException, InterruptedException {
BlockHound.install();
Mono.fromCallable(() -> {
System.out.println("block() - " + Thread.currentThread().getName());
return readFile(testFilePath);
})
.subscribeOn(Schedulers.parallel())
.block();
Mono.fromCallable(() -> {
System.out.println("toFuture() - " + Thread.currentThread().getName());
return readFile(testFilePath);
})
.subscribeOn(Schedulers.parallel())
.toFuture()
.get();
Mono.delay(Duration.ofMillis(10))
.doOnNext(it -> {
System.out.println("doOnNext() - " + Thread.currentThread().getName());
readFile(testFilePath);
})
.block();
}
static String readFile(Path path) {
try {
return Files.readString(path);
} catch (IOException e) {
throw new RuntimeException("Could not read file: " + path, e);
}
}
// Logs:
// block() - parallel-1
// toFuture() - parallel-2
// doOnNext() - parallel-3 |
Expected Behavior
Actual Behavior
BlockHound does not detect call
Files.readString(path)
.Steps to Reproduce
I created small project to test this issue.
Your Environment
The text was updated successfully, but these errors were encountered: