mirror of https://github.com/sbt/sbt.git
ServerApplication: yield before we check on the dumper thread
This commit is contained in:
parent
1e80d811a1
commit
007a8f2a70
|
|
@ -113,6 +113,9 @@ class StreamDumper(in: java.io.BufferedReader, out: java.io.PrintStream) extends
|
|||
// any stuff.
|
||||
if (waitForErrors) {
|
||||
endTime.set(System.currentTimeMillis + 2000)
|
||||
// at this point we'd rather the dumper thread run
|
||||
// before we check whether to sleep
|
||||
Thread.yield()
|
||||
// let ourselves read more (thread should exit on earlier of endTime or EOF)
|
||||
while (isAlive() && (endTime.get > System.currentTimeMillis))
|
||||
Thread.sleep(50)
|
||||
|
|
|
|||
Loading…
Reference in New Issue