mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
Runnable в RequestWorker
This commit is contained in:
parent
5c01d5fd17
commit
ec6e27ab43
1 changed files with 2 additions and 4 deletions
|
@ -1,8 +1,6 @@
|
||||||
package ru.gravit.launcher.client;
|
package ru.gravit.launcher.client;
|
||||||
|
|
||||||
import javafx.concurrent.Task;
|
import javafx.concurrent.Task;
|
||||||
import ru.gravit.launcher.LauncherAPI;
|
|
||||||
import ru.gravit.launcher.request.Request;
|
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
|
|
||||||
import java.util.concurrent.BlockingQueue;
|
import java.util.concurrent.BlockingQueue;
|
||||||
|
@ -13,13 +11,13 @@ public RequestWorker()
|
||||||
{
|
{
|
||||||
queue = new LinkedBlockingQueue<>(64);
|
queue = new LinkedBlockingQueue<>(64);
|
||||||
}
|
}
|
||||||
public BlockingQueue<Task> queue;
|
public BlockingQueue<Runnable> queue;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
while (!Thread.interrupted())
|
while (!Thread.interrupted())
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Task task;
|
Runnable task;
|
||||||
task = queue.take();
|
task = queue.take();
|
||||||
task.run();
|
task.run();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
|
Loading…
Reference in a new issue