#8 wrap Shell in a dedicated Thread
This commit is contained in:
parent
c86aaccfba
commit
95c2d445a7
@ -26,6 +26,7 @@ public class Nameserver implements INameserver {
|
|||||||
private NameServerRemote nameServerLocal;
|
private NameServerRemote nameServerLocal;
|
||||||
|
|
||||||
private Shell shell;
|
private Shell shell;
|
||||||
|
private Thread shellThread;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new server instance.
|
* Creates a new server instance.
|
||||||
@ -80,11 +81,12 @@ public class Nameserver implements INameserver {
|
|||||||
this.shutdown();
|
this.shutdown();
|
||||||
throw new StopShellException();
|
throw new StopShellException();
|
||||||
})));
|
})));
|
||||||
|
shellThread = new Thread(shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
shell.run();
|
shellThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user