diff options
author | Sven Gothel <[email protected]> | 2015-09-05 04:42:53 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-05 04:42:53 +0200 |
commit | db7ce1c9c271edf6dc08db9f920adc93df9b2bb0 (patch) | |
tree | 2113f5718d00840126f26f45fbada77e65794018 /src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java | |
parent | 6cfca260ed7e901223f8f675d060a88a518cf7d1 (diff) |
Bug 1213 - RecursiveThreadGroupLockImpl01Unfairish.unlock() always interrupts original-owner, even if not waiting at unlock()
RecursiveThreadGroupLockImpl01Unfairish.unlock():
An interrupt() is always issued
from group members on the original owner.
This shall only happen, if the original owner is waiting
within unlock() for all group members to be unlocked.
This extra interrupt causes side-effects, see Bug 1211.
Only issue the interrupt to wake-up the original owner
iff waiting within unlock!
+++
RecursiveLockImpl01CompleteFair:
Issue 'Thread.interrupted()' to clear a slipped interrupt
call after while-loop.
Diffstat (limited to 'src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java')
-rw-r--r-- | src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java b/src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java index c930dff..f86dd33 100644 --- a/src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java +++ b/src/java/jogamp/common/util/locks/RecursiveLockImpl01CompleteFair.java @@ -215,6 +215,7 @@ public class RecursiveLockImpl01CompleteFair implements RecursiveLock { } // else: Issued by unlock, owning lock .. expected! } } while ( cur != sync.getOwner() && 0 < timeout ) ; + Thread.interrupted(); // clear slipped interrupt if( 0 >= timeout && cur != sync.getOwner() ) { // timed out |