Fixing ticket #1008, removing tryWithLock
This commit is contained in:
parent
36ed15eac6
commit
5df3fbf9d5
1 changed files with 0 additions and 9 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue