Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto-Gentili committed Oct 8, 2022
2 parents eedf4e2 + c1e08ee commit 8b03b84
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[![Maven Central with version prefix filter](https://img.shields.io/maven-central/v/org.burningwave/core/12)](https://maven-badges.herokuapp.com/maven-central/org.burningwave/core/)
[![GitHub](https://img.shields.io/github/license/burningwave/core)](https://github.com/burningwave/core/blob/master/LICENSE)

[![Platforms](https://img.shields.io/badge/platforms-Windows%2C%20Mac%20OS%2C%20Linux-orange)](https://github.com/burningwave/core/actions/runs/3112302211)
[![Platforms](https://img.shields.io/badge/platforms-Windows%2C%20Mac%20OS%2C%20Linux-orange)](https://github.com/burningwave/core/actions/runs/3211453539)

[![Supported JVM](https://img.shields.io/badge/supported%20JVM-8%2C%209+%20(19)-blueviolet)](https://github.com/burningwave/core/actions/runs/3112302211)
[![Supported JVM](https://img.shields.io/badge/supported%20JVM-8%2C%209+%20(19)-blueviolet)](https://github.com/burningwave/core/actions/runs/3211453539)

[![Coveralls github branch](https://img.shields.io/coveralls/github/burningwave/core/master)](https://coveralls.io/github/burningwave/core?branch=master)
[![GitHub open issues](https://img.shields.io/github/issues/burningwave/core)](https://github.com/burningwave/core/issues)
Expand Down Expand Up @@ -49,7 +49,7 @@ To include Burningwave Core library in your projects simply use with **Apache Ma
<dependency>
<groupId>org.burningwave</groupId>
<artifactId>core</artifactId>
<version>12.59.1</version>
<version>12.60.3</version>
</dependency>
```

Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<groupId>org.burningwave</groupId>
<artifactId>core</artifactId>
<version>12.59.2-SNAPSHOT</version>
<version>12.60.4-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Burningwave Core</name>
Expand Down Expand Up @@ -95,7 +95,7 @@
<jakarta.validation.version>2.0.2</jakarta.validation.version>
<junit-jupiter.version>5.9.1</junit-jupiter.version>
<junit.version>1.9.1</junit.version>
<burningwave-jvm-driver.version>8.10.0</burningwave-jvm-driver.version>
<burningwave-jvm-driver.version>8.10.1</burningwave-jvm-driver.version>
<maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
Expand Down Expand Up @@ -135,7 +135,7 @@
</scm>

<dependencies>

<dependency>
<groupId>org.burningwave</groupId>
<artifactId>jvm-driver</artifactId>
Expand Down Expand Up @@ -286,7 +286,7 @@
<Bundle-Description>${project.description}</Bundle-Description>
<Bundle-Version>${project.version}</Bundle-Version>
<Require-Capability>osgi.ee;filter:="(&amp;(osgi.ee=JavaSE)(version=1.8))"</Require-Capability>
<Import-Package>javax.tools,io.github.toolfactory.jvm;version="9.3.0",org.burningwave.jvm;version="8.9.0";resolution:=optional,io.github.toolfactory.jvm.util,org.slf4j;version="1.7.0";resolution:=optional</Import-Package>
<Import-Package>javax.tools,io.github.toolfactory.jvm;version="9.4.2",org.burningwave.jvm;version="8.10.1";resolution:=optional,io.github.toolfactory.jvm.util,org.slf4j;version="1.7.0";resolution:=optional</Import-Package>
<Export-Package>org.burningwave.core;uses:="org.burningwave.core.classes,org.burningwave.core.concurrent,org.burningwave.core.function,org.burningwave.core.io,org.burningwave.core.iterable";version="12.45.3",org.burningwave.core.assembler;uses:="io.github.toolfactory.jvm,org.burningwave.core,org.burningwave.core.classes,org.burningwave.core.concurrent,org.burningwave.core.io,org.burningwave.core.iterable,org.burningwave.core.jvm";version="12.45.3",org.burningwave.core.classes;uses:="io.github.toolfactory.jvm.util,org.burningwave.core,org.burningwave.core.concurrent,org.burningwave.core.function,org.burningwave.core.io,org.burningwave.core.iterable";version="12.45.3",org.burningwave.core.concurrent;uses:="org.burningwave.core,org.burningwave.core.function";version="12.45.3",org.burningwave.core.function;version="12.45.3",org.burningwave.core.io;uses:="org.burningwave.core,org.burningwave.core.classes";version="12.45.3",org.burningwave.core.iterable;uses:="org.burningwave.core,org.burningwave.core.concurrent,org.burningwave.core.function";version="12.45.3",org.burningwave.core.jvm;uses:="org.burningwave.core,org.burningwave.core.io,org.burningwave.core.iterable";version="12.45.3"</Export-Package>
<Multi-Release>true</Multi-Release>
</manifestEntries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public <E, T extends TaskAbst<E, T>> boolean interrupt(T task) {
return terminate(task, Thread::interrupt, TaskAbst::interrupt, true);
}

@Deprecated/*(since="12.60.0")*/
public <E, T extends TaskAbst<E, T>> boolean kill(T task) {
return terminate(task, Thread::kill, TaskAbst::kill, true);
}
Expand All @@ -400,6 +401,7 @@ public <E, T extends TaskAbst<E, T>> boolean interrupt(T task, boolean terminate
return terminate(task, Thread::interrupt, TaskAbst::interrupt, terminateChildren);
}

@Deprecated/*(since="12.60.0")*/
public <E, T extends TaskAbst<E, T>> boolean kill(T task, boolean terminateChildren) {
return terminate(task, Thread::kill, TaskAbst::kill, terminateChildren);
}
Expand Down Expand Up @@ -1195,6 +1197,7 @@ public T abort() {
return (T)this;
}

@Deprecated/*(since="12.60.0")*/
public T kill() {
return kill(true);
}
Expand All @@ -1203,6 +1206,7 @@ public T interrupt() {
return interrupt(true);
}

@Deprecated/*(since="12.60.0")*/
public T kill(boolean terminateChildren) {
getQueuedTasksExecutor().kill((T)this, terminateChildren);
return (T)this;
Expand Down Expand Up @@ -1724,6 +1728,7 @@ public <E, T extends TaskAbst<E, T>> boolean abort(T task) {
return false;
}

@Deprecated/*(since="12.60.0")*/
public <E, T extends TaskAbst<E, T>> boolean kill(T task) {
for (Entry<Integer, QueuedTaskExecutor> queuedTasksExecutorBox : queuedTasksExecutors.entrySet()) {
if (queuedTasksExecutorBox.getValue().kill(task)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.burningwave.core.Closeable;
import org.burningwave.core.concurrent.QueuedTaskExecutor.TaskAbst;

@SuppressWarnings("deprecation")
public class TasksMonitorer implements Closeable {
Map<QueuedTaskExecutor.TaskAbst<?, ?>, StackTraceElement[]> waitingTasksAndLastStackTrace;
QueuedTaskExecutor.Group queuedTasksExecutorGroup;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/burningwave/core/concurrent/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import org.burningwave.core.function.ThrowingConsumer;
import org.burningwave.core.iterable.IterableObjectHelper.ResolveConfig;

@SuppressWarnings("deprecation")
public abstract class Thread extends java.lang.Thread {
private final static ThrowingConsumer<Thread, ? extends Throwable> nullExecutableNotifier;

Expand Down Expand Up @@ -179,6 +180,7 @@ void shutDown(boolean waitForFinish) {
}
}

@Deprecated/*(since="12.60.0")*/
public void kill() {
terminate(thread ->
Driver.stop(thread),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@

import org.burningwave.core.concurrent.QueuedTaskExecutor;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

public class BackgroundExecutorTest extends BaseTest {


@Test
@EnabledForJreRange(max = JRE.JAVA_19)
public void killTestOne() {
testDoesNotThrow(() -> {
assertTrue(
Expand Down Expand Up @@ -75,6 +78,7 @@ public void stressTestTwo() {
}

@Test
@EnabledForJreRange(max = JRE.JAVA_19)
public void killTestTwo() {
testDoesNotThrow(() -> {
AtomicBoolean executed = new AtomicBoolean(false);
Expand Down

0 comments on commit 8b03b84

Please sign in to comment.