Fixing ticket #1008, removing tryWithLock

This commit is contained in:
Viktor Klang 2011-07-09 17:53:43 +02:00
parent 36ed15eac6
commit 5df3fbf9d5

View file

@ -22,15 +22,6 @@ final class ReentrantGuard {
lock.unlock
}
}
final def tryWithGuard[T](body: T): T = {
while (!lock.tryLock) { Thread.sleep(10) } // wait on the monitor to be unlocked
try {
body
} finally {
lock.unlock
}
}
}
/**