# | Line 314 | Line 314 | public class Semaphore implements java.i | |
---|---|---|
314 | * in the application. | |
315 | */ | |
316 | public void release() { | |
317 | < | // Even if using fair locks, releases should try to barge in. |
318 | < | if (!lock.tryLock()) |
319 | < | lock.lock(); |
320 | < | |
317 | > | lock.lock(); |
318 | try { | |
319 | ++count; | |
320 | available.signal(); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |