Skip to content

Commit

Permalink
Prepare next release
Browse files Browse the repository at this point in the history
  • Loading branch information
vsilaev committed May 29, 2023
1 parent 6edb743 commit b2627cb
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 44 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.5/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.5) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
[![Maven Central](https://img.shields.io/maven-central/v/net.tascalate.async/net.tascalate.async.parent.svg)](https://search.maven.org/artifact/net.tascalate.async/net.tascalate.async.parent/1.2.6/pom) [![GitHub release](https://img.shields.io/github/release/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/releases/tag/1.2.6) [![license](https://img.shields.io/github/license/vsilaev/tascalate-async-await.svg)](https://github.com/vsilaev/tascalate-async-await/blob/master/LICENSE)
# Why async-await?
Asynchronous programming has long been a useful way to perform operations that don’t necessarily need to hold up the flow or responsiveness of an application. Generally, these are either compute-bound operations or I/O bound operations. Compute-bound operations are those where computations can be done on a separate thread, leaving the main thread to continue its own processing, while I/O bound operations involve work that takes place externally and may not need to block a thread while such work takes place. Common examples of I/O bound operations are file and network operations.

Expand All @@ -18,7 +18,7 @@ First, add Maven dependency to the library runtime:
<dependency>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.runtime</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
</dependency>
```
Second, add the following build plugins in the specified order:
Expand All @@ -29,7 +29,7 @@ Second, add the following build plugins in the specified order:
<plugin>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.tools.maven</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<executions>
<execution>
<id>tascalate-async-enhance-main-classes</id>
Expand All @@ -52,7 +52,7 @@ Second, add the following build plugins in the specified order:
<plugin>
<groupId>net.tascalate.javaflow</groupId>
<artifactId>net.tascalate.javaflow.tools.maven</artifactId>
<version>2.7.3</version>
<version>2.7.5</version>
<executions>
<execution>
<id>javaflow-enhance-main-classes</id>
Expand Down Expand Up @@ -85,8 +85,8 @@ buildscript {
}
dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.6'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.5'
/* other plugins */
}
}
Expand All @@ -101,7 +101,7 @@ repositories {
}
dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.6'
/* other dependencies */
}
```
Expand All @@ -113,8 +113,8 @@ buildscript {
}
dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.6'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.5'
/* other plugins */
}
}
Expand All @@ -129,20 +129,20 @@ repositories {
}
dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.6'
/* Async/Await Extras */
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.6'
/* Promise<T> implementation */
/* Necessary because net.tascalate.async.extras uses it as an */
/* 'optional' dependency to avoid concrete version lock-in. */
implementation 'net.tascalate:net.tascalate.concurrent:0.9.6'
/* Necessary only for different providers */
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.5'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.6'
/*
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.5'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.6'
*/
Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
16 changes: 8 additions & 8 deletions net.tascalate.async.examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildscript {
}

dependencies {
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.5'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.3'
classpath 'net.tascalate.async:net.tascalate.async.tools.gradle:1.2.6'
classpath 'net.tascalate.javaflow:net.tascalate.javaflow.tools.gradle:2.7.5'
}
}

Expand All @@ -19,20 +19,20 @@ repositories {
}

dependencies {
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.5'
implementation 'net.tascalate.async:net.tascalate.async.runtime:1.2.6'
implementation 'net.tascalate.async:net.tascalate.async.extras:1.2.6'

/* Necessary only for different providers */
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.5'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.5'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.propagated:1.2.6'
runtimeOnly 'net.tascalate.async:net.tascalate.async.resolver.provided:1.2.6'

/* Promise<T> implementation */
/* Necessary because net.tascalate.async.extras uses it as an */
/* 'optional' dependency to avoid concrete version lock-in. */
implementation 'net.tascalate:net.tascalate.concurrent:0.9.6'

/* When used with Async/Await Java Agent and dynamic open modules */
implementation 'net.tascalate.instrument:net.tascalate.instrument.emitter:1.3.0'
implementation 'net.tascalate.instrument:net.tascalate.instrument.emitter:1.3.2'

testImplementation 'junit:junit:4.13.2'
}
Expand All @@ -44,7 +44,7 @@ dependencies {
}

group = 'net.tascalate.async.examples'
version = '1.2.5'
version = '1.2.6'
description = 'Tascalate Async/Await - Simple Examples'
java.sourceCompatibility = JavaVersion.VERSION_1_9

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void main(String[] args) {
}

@async
Promise<String> outerCallExplicit(String delimeter, @SchedulerProvider Scheduler scheduler, int zz) {
Promise<String> outerCallExplicit(String delimeter, @SchedulerProvider Scheduler scheduler, int zz) {
System.out.println("Outer call explicit, current scheduler - " + CurrentCallContext.scheduler());
System.out.println("Outer call explicit, thread : " + Thread.currentThread().getName());
await(innerCallImplicit());
Expand All @@ -125,7 +125,7 @@ Promise<String> outerCallExplicit(String delimeter, @SchedulerProvider Scheduler
}

@async
Promise<String> innerCallImplicit() {
Promise<String> innerCallImplicit() {
System.out.println("Inner call explicit, current scheduler - " + CurrentCallContext.scheduler());
String v = await(CompletableFuture.supplyAsync(() -> "XYZ", executor));
System.out.println("Inner call explicit, thread : " + Thread.currentThread().getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static void main(final String[] argv) throws Exception {
System.out.println("Result " + LocalTime.now());
System.out.println(r);
}
executor.shutdown();
});

// Need to wait because NIO uses daemon threads that do not prevent program exit
Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.extras/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.propagated/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.provided/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.scoped/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.resolver.swing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,9 @@ protected void createAccessMethodsForAsyncMethod() {
if (instruction instanceof MethodInsnNode) {
MethodInsnNode methodInstructionNode = (MethodInsnNode) instruction;
boolean isOwnMethod = methodInstructionNode.owner.equals(classNode.name);
int mopcode = methodInstructionNode.getOpcode();
if (
(methodInstructionNode.getOpcode() == INVOKEVIRTUAL ||
methodInstructionNode.getOpcode() == INVOKESPECIAL ||
methodInstructionNode.getOpcode() == INVOKESTATIC
) &&
(mopcode == INVOKEVIRTUAL || mopcode == INVOKESPECIAL || mopcode == INVOKESTATIC) &&
(isOwnMethod || helper.isSubClass(classNode.name, methodInstructionNode.owner))) {

String actualClassName;
Expand All @@ -496,7 +494,7 @@ protected void createAccessMethodsForAsyncMethod() {

boolean samePackageAccessible =
// Note that INVOKESPECIAL IS NOT ACCESSIBLE OTSIDE CLASS ITSELF AT ALL
(methodInstructionNode.getOpcode() == INVOKEVIRTUAL || methodInstructionNode.getOpcode() == INVOKESTATIC) &&
(mopcode == INVOKEVIRTUAL || mopcode == INVOKESTATIC || (mopcode == INVOKESPECIAL && "<init>".equals(methodInstructionNode.name))) &&
null != targetMethodNode &&
(targetMethodNode.access & ACC_PRIVATE) == 0 &&
((targetMethodNode.access & ACC_PUBLIC) != 0 || samePackage(classNode.name, actualClassName));
Expand All @@ -505,6 +503,7 @@ protected void createAccessMethodsForAsyncMethod() {
if (log.isTraceEnabled()) {
log.trace("Found private call " + BytecodeTraceUtil.toString(methodInstructionNode));
}
// TODO Add special handling for private constructor calls
createAccessMethod(methodInstructionNode, methods);
}
}
Expand Down
5 changes: 5 additions & 0 deletions net.tascalate.async.tools.gradle/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.gradle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion net.tascalate.async.tools.maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<relativePath>../</relativePath>
</parent>

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

<groupId>net.tascalate.async</groupId>
<artifactId>net.tascalate.async.parent</artifactId>
<version>1.2.5</version>
<version>1.2.6</version>
<packaging>pom</packaging>

<name>Tascalate Async/Await</name>
Expand Down Expand Up @@ -52,10 +52,10 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tascalate.concurrent.version>0.9.6</tascalate.concurrent.version>
<tascalate.javaflow.version>2.7.3</tascalate.javaflow.version>
<tascalate.javaflow.version>2.7.5</tascalate.javaflow.version>
<tascalate.javaflow.extras.version>2.4.3</tascalate.javaflow.extras.version>
<tascalate.asmx.version>9.3.0</tascalate.asmx.version>
<tascalate.instrument.version>1.3.0</tascalate.instrument.version>
<tascalate.asmx.version>9.5.0</tascalate.asmx.version>
<tascalate.instrument.version>1.3.2</tascalate.instrument.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -245,7 +245,7 @@
<plugin>
<groupId>org.moditect</groupId>
<artifactId>moditect-maven-plugin</artifactId>
<version>1.0.0.Beta2</version>
<version>1.0.0.Final</version>
<executions>
<execution>
<id>add-module-infos</id>
Expand Down

0 comments on commit b2627cb

Please sign in to comment.