| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
'spawn off' process to become the lock owner.
To avoid complicated synchronization via synchronized, wait and notify between one thread
and a 'spawn' off thread which temporarly requires the hold lock,
RecursiveThreadGroupLock allows to add and remove other threads to become owners of the lock
as if they were the original holder.
This simplifies some rare locking use cases, eg. in JOGL's GLProfile initialization sequence
where a SharedResourceRunner thread is taking over initialization of shared resources.
|
|
|
|
|
|
| |
RecursiveLockImpl01Unfairish.Sync
RecursiveLockImpl01Unfairish changes are in preparation of RecursiveGroupThreadLock.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- RecursiveLock _is_ interface.
- Use LockFactory to create a RecursiveLock.
- Impl: RecursiveLockImpl01Unfairish
- just using notify w/o any queue: fast
- still enqueuing new lock-applicants if queue full (nice)
- lock's sync extends AbstractOwnableSynchronizer and uses it (monitor)
- Impl: RecursiveLockImpl01CompleteFair
- using queue and interrupt for correctness (slow)
- lock's sync extends AbstractOwnableSynchronizer and uses it (monitor)
- Impl: RecursiveLockImplJava5 for using Java5's concurrency impl.
- to verify correctness, performance and deviation of locking time
TestRecursiveLock01 new performance measurements incl. simple avrg and deviation
shows best combined performance-deviation w/ our RecursiveLockImpl01Unfairish
os Linux and MacOSX.
RecursiveLockImpl01Unfairish is the default in LockFactory.
Adding 'private' LockDebugUtil, allowing validating all holdings locks
of one thread as stack traces (Throwable).
Besides the AbstractOwnableSynchronizer utilization, this helps debugging deadlocks
and starvation very well.
|
|
|
|
| |
interface
|
| |
|
| |
|
|
moved up)
We learned that FileChannel.lock() is not reliable on at least GNU/Linux + Sun's JVM implementation,
hence we need a ServerSocket implementation.
Since this code may be useful to others, it has been promoted to GlueGen.
- Abstract SingletonInstance
- Implement Lock interface
- SingletonInstance Spezialisation: FileLock and ServerSocket
Minor API Change: LockExt.isLocked() -> Lock.isLocked()
|