Drop java 8 support in favor of Java 11 to improve performance in the busy wait loop.

This commit is contained in:
Andrea Cavalli 2021-01-25 20:15:36 +01:00
parent ff72991557
commit 5c77e88ea3
3 changed files with 5 additions and 5 deletions

View File

@ -53,8 +53,10 @@ public class ResponseReceiver extends Thread implements AutoCloseable {
while(!closeRequested || !registeredClients.isEmpty()) {
int resultsCount = NativeClientAccess.receive(clientIds, eventIds, events, 2.0 /*seconds*/);
if (resultsCount <= 0)
if (resultsCount <= 0) {
Thread.onSpinWait();
continue;
}
Set<Integer> closedClients = new HashSet<>();

View File

@ -167,8 +167,7 @@
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<release>11</release>
<useIncrementalCompilation>false</useIncrementalCompilation>
<excludes>
<exclude>it/tdlight/tdlight/**</exclude>

View File

@ -167,8 +167,7 @@
<version>3.8.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
<release>11</release>
<useIncrementalCompilation>false</useIncrementalCompilation>
<excludes>
<exclude>it/tdlight/tdlib/**</exclude>