in src/java/org/jetbrains/plugins/clojure/repl/ClojureReplProcessHandler.java [335:371]
public void run() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
try {
myAlarm.addRequest(new Runnable() {
public void run() {
if (!isClosed()) {
myAlarm.addRequest(this, NOTIFY_TEXT_DELAY);
checkTextAvailable();
}
}
}, NOTIFY_TEXT_DELAY);
try {
while (!isClosed()) {
final int c = readNextByte();
if (c == -1) {
break;
}
synchronized (myBuffer) {
myBuffer.append((char) c);
}
if (c == '\n') { // not by '\r' because of possible '\n'
checkTextAvailable();
}
}
}
catch (Exception e) {
LOG.error(e);
e.printStackTrace();
}
close();
}
finally {
Thread.currentThread().setPriority(Thread.NORM_PRIORITY);
}
}