mirror of https://github.com/sbt/sbt.git
There can be race conditions where we try to interrupt and join a ui thread before it becomes interruptible by blockign on a queue. To workaround this, we can add the JoinThread class which adds an extension method Thread.joinFor that takes a FiniteDuration parameter. This variant of join will repeatedly interrupt and attempt to join the thread for up to 10 milliseconds before retrying until the limit is reached. If the limit is reached, we print a noisy error to the console. I'm not 100% sure if we are leaking threads in the latest sbt version but this gives me more piece of mind that either we are always successfully joining the threads or we will be alerted if the joining fails. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||