mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
PY-75515 Refactoring: move duplicated code to inner class
GitOrigin-RevId: b27150a87929cfdd271d8d6b4fd017d39df1dd61
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc4b3eccd4
commit
7f498ca2c8
@@ -48,6 +48,18 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
|
||||
private final @NotNull ExecutorService myExecutor;
|
||||
|
||||
private class ConnectToDebuggerTask implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
tryToConnectRemoteDebugger();
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ClientModeMultiProcessDebugger(@NotNull final IPyDebugProcess debugProcess,
|
||||
@NotNull String host, int port) {
|
||||
myDebugProcess = debugProcess;
|
||||
@@ -58,16 +70,7 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
|
||||
myExecutor = ConcurrencyUtil.newSingleThreadExecutor(connectionThreadsName);
|
||||
|
||||
Runnable task = () -> {
|
||||
try {
|
||||
tryToConnectRemoteDebugger();
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
};
|
||||
|
||||
myExecutor.execute(task);
|
||||
myExecutor.execute(new ConnectToDebuggerTask());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,14 +90,7 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
|
||||
try {
|
||||
ProcessCreatedMsgReceivedCommand command = new ProcessCreatedMsgReceivedCommand(this, commandSequence);
|
||||
command.execute();
|
||||
myExecutor.execute(() -> {
|
||||
try {
|
||||
tryToConnectRemoteDebugger();
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
});
|
||||
myExecutor.execute(new ConnectToDebuggerTask());
|
||||
}
|
||||
catch (PyDebuggerException e) {
|
||||
LOG.info(e);
|
||||
|
||||
Reference in New Issue
Block a user