use val instead of var

This commit is contained in:
xuwei-k 2018-07-08 22:30:25 +09:00
parent e5af0fe0e9
commit 98eca81b17
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@ abstract class EvaluateSettings[Scope] {
}): Seq[INode[_]]
}
private[this] var running = new AtomicInteger
private[this] var cancel = new AtomicBoolean(false)
private[this] val running = new AtomicInteger
private[this] val cancel = new AtomicBoolean(false)
def run(implicit delegates: Scope => Seq[Scope]): Settings[Scope] = {
assert(running.get() == 0, "Already running")