Drop java 8 support in favor of Java 11 to improve performance in the busy wait loop.
This commit is contained in:
parent
ff72991557
commit
5c77e88ea3
@ -53,8 +53,10 @@ public class ResponseReceiver extends Thread implements AutoCloseable {
|
|||||||
while(!closeRequested || !registeredClients.isEmpty()) {
|
while(!closeRequested || !registeredClients.isEmpty()) {
|
||||||
int resultsCount = NativeClientAccess.receive(clientIds, eventIds, events, 2.0 /*seconds*/);
|
int resultsCount = NativeClientAccess.receive(clientIds, eventIds, events, 2.0 /*seconds*/);
|
||||||
|
|
||||||
if (resultsCount <= 0)
|
if (resultsCount <= 0) {
|
||||||
|
Thread.onSpinWait();
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
Set<Integer> closedClients = new HashSet<>();
|
Set<Integer> closedClients = new HashSet<>();
|
||||||
|
|
||||||
|
@ -167,8 +167,7 @@
|
|||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
<source>1.8</source>
|
<release>11</release>
|
||||||
<target>1.8</target>
|
|
||||||
<useIncrementalCompilation>false</useIncrementalCompilation>
|
<useIncrementalCompilation>false</useIncrementalCompilation>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>it/tdlight/tdlight/**</exclude>
|
<exclude>it/tdlight/tdlight/**</exclude>
|
||||||
|
@ -167,8 +167,7 @@
|
|||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<encoding>UTF-8</encoding>
|
<encoding>UTF-8</encoding>
|
||||||
<source>1.8</source>
|
<release>11</release>
|
||||||
<target>1.8</target>
|
|
||||||
<useIncrementalCompilation>false</useIncrementalCompilation>
|
<useIncrementalCompilation>false</useIncrementalCompilation>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>it/tdlight/tdlib/**</exclude>
|
<exclude>it/tdlight/tdlib/**</exclude>
|
||||||
|
Loading…
Reference in New Issue
Block a user