News
- Sept 3, 2007
- Version 3.1 released. Now includes versions for Java 6.0
- Nov 11, 2006
- Version 3.0 released. Now includes versions for Java 1.2, 1.3, 1.4, and 5.0 (sic!)
- Jun 4, 2006
- Version 2.2 released.
Changelog
Version 3.1 (Jul 5, 2006)
SVN logs:
[Java 1.4,
Java 1.2 - 1.3,
Java 5.0,
Java 6.0]
- New features
- Version for Java 6.0 available! The 5.0 and 6.0 version matches the performance of java.util.concurrent.
- Javadoc clarifications and small improvements, following JSR 166.
- Bug fixes
- 6523756: ThreadPoolExecutor shutdownNow vs execute race.
- 6464365: FutureTask.{set,setException} not called by run().
- 6529795: (coll)Iterator.remove() fails if next() threw NoSuchElementException.
SVN logs: [Java 1.4, Java 5.0, Java 1.2 - 1.3]
- New features
- Versions for Java 1.2, 1.3, and 5.0 available! The 5.0 version matches the performance of java.util.concurrent.
- Unit tests now support JUnit's graphical interface.
- Added missing methods in TimeUnit to fully emulate enumeration functionality. Patch contributed by Andy Gerwick.
- A few small optimizations: better hash function in ConcurrentHashMap, better toArray in views of ConcurrentSkipListMap
- Many Javadoc clarifications, following JSR 166.
- Bug fixes
- Reconcillation with JSR 166 code base: refactored thread pools, fixing many minor problems, including 6440728, 6435792, improve shutdownNow guarantees, Don't create thread when terminated, Make isTerminating match spec, Preserve core pool size when tasks encounter exceptions, Distinguish throws of RuntimeExceptions vs Errors.
- Class CheckedMap not serializable. Thanks to Xavier Le Vourch for finding the bug and contributing the fix.
- Subtle inconsistency with JSR166 in what type of exception is thrown when one tries to release non-owned RRWL. Thanks to Jesse Wilson for reporting this bug.
- Missing signals in condition.awaitUninterruptibly on some platforms. Thanks to Piccand RĂ©gis for reporting this bug.
- New features
- The backport now compiles under Java 5.0.
- Enhancements in the Navigable[Map,Set] interfaces.
- Blocking atomic multi-acquires in fair semaphores.
- Javadoc enhancements (reconciled with recent java.util.concurrent).
- Shutdown upon finalization for factory-created executors.
- Bug fixes
- broken type-checked map in Collections. Thanks for Taras Puchko for finding this bug and submitting the fix.
- Collections.reverseComparator(Comparator) not working properly when null passed as the argument.
- Tests
- Updated and reconciled with java.util.concurrent tests.
- New features
- Descending iterators in deques
- Use newTaskFor() in ExecutionCompletionService.submit()
- toArray(Object[]) appends null at the end in LinkedBlockingQueue
- Overflow detection in ReentrantLock
- ReentrantReadWriteLock: better conformance with JSR 166 by adding public inner classes for ReadLock and WriteLock
- CopyOnWriteArraySet.equals() optimized towards small sets
- Snapshot iterators in queues
- Improved performance of toArray() in several collection classes
- More collection stuff ported, including new things in Arrays, and base collection classes with toArray() supporting concurrent collections
- Improved comparison of ScheduledFutureTasks in the ScheduledThreadPoolExecutor
- Licensing
- New, public domain implementations for CopyOnWriteArrayList, TreeMap, TreeSet, LinkedList, Collections, Arrays
- Bug fixes
- Methods equals() and hashCode() were broken in PriorityQueue. The fix allows PriorityQueues to be used as hash keys.
- ReentrantReadWriteLock.getWriteHoldCount could return a posititive value even if the write lock was not owned by the inquiring thread
- Condition variables were not working properly with reentrant locks when the hold count was greater than 1. Await methods were releasing only a single hold, not all of them, as they should
- Handling of non-comparable entries (which is an erroneous condition) by priority queues has been made more deterministic. (This issue/fix does not affect correctly written programs)
- Fix of CR 6312056 (ConcurrentHashMap.entrySet().iterator() can return entry with never-existent value)
- Livelock in Exchanger if used by more than two threads
- Erroneous behavior of interrupted CyclicBarrier and locks on some (buggy) JVMs (thanks to Yew-Yap Goh for reporting this)
- Tests
- New and improved "loops" tests, including CollectionLoops, IteratorLoops, StringMapLoops, TSPExchangerTest, TimeoutExchangerLoops, UnboundedQueueFillEmptyLoops, EntryTest
- New "serial compatibility" test
- Compatibility fix: ConcurrentHashMap was no longer inheriting from java.util.AbstractMap, although it was in version 1.1_01. Now it does again.
- Licensing: new, public-domain implementation of PriorityQueue, and refactoring of backported AbstractMap so that it also contains only the public domain code.
- New features
- Features and fixes resulting from reconcillation with JSR 166 as of Jul 4, such as: lazySet in atomics, AbstractExecutorService.newTaskFor(), RunnableFuture, RunnableScheduledFuture, ScheduledThreadPoolExecutor.decorateTask(), better interrupt detection in ThreadPoolExecutor, avoiding garbage retention with timeouts in SynchronousQueue, fixed reset in CyclicBarrier, remove(x,null) -> false in ConcurrentHashMap, changes in navigable maps, addAll fixed in CopyOnWriteArrayList, etc.
- New backported classes: ConcurrentLinkedQueue, ConcurrentSkipList[Map,Set]
- Optimizations (replacement of ReentrantLock by synchronized) in: CyclicBarrier, DelayQueue, Exchanger, ThreadPoolExecutor
- Optimizations of atomic variables (simple reads are now volatile rather than synchronized)
- New backported methods in the fair implementation of the ReentrantLock: hasWaiters(Condition), getWaitQueueLength(Condition), getWaitingThreads(Condition)
- Retrofitted collection classes: AbstractMap, Collections, LinkedList, Tree[Map,Set]
- Numerous javadoc clarifications and fixes
- Bug fixes
- Upon deserialization, ReentrantLock, ReentrantReadWriteLock, and Semaphore were potentially in a locked (or even illegal) state, contrary to the javadoc
- In the fair implementation of ReentrantLock, wait queues of condition variables were not actually fair - they are now
- LinkedBlockingQueue had potential deadlocks in remove() and toArray(). It has now been replaced by a completely new implementation, based on java.u.c (rather than dl.u.c)
- Race condition in Condition.awaitUninterruptibly() could cause signals to be missed if they were coinciding with interrupt attempts
- Tests
- Updated unit tests for atomics, AbstractQueuedSynchonizer, ConcurrentHashMap, CyclicBarrier, ExecutorCompletionService, LinkedBlockingQueue, ReentrantLock, ReentrantReadWriteLock, ScheduledExecutor, ThreadPoolExecutor
- New unit tests for ConcurrentLinkedQueue, ConcurrentSkipList[Map,Set], Utils.nanoTime(), LinkedList, Tree[Map,Set]
- Updated numerous stress tests, and new ones added: CachedThreadPoolLoops, [Collection,Map]WordLoops, CASLoops, and more
- Bugfix: race condition in the fair implementation of ReentrantLock caused it to occassionally cause IllegalMonitorState exceptions. Non-fair implementation was not affected, however, classes that depend on fair reentrant locks, namely: fair ArrayBlockingQueue, fair SynchronousQueue, and PriorityQueue, were affected. Thanks to Ramesh Nethi for reporting this bug and helping to track it down.
- Testing: backport has been stress-tested using the "loops" tests (courtesy of Doug Lea and the JSR 166 Expert Group). The tests are included in the development source bundle.
- Bugfix: on Windows platforms with Java 1.4.2, the library were sometimes behaving as if timeouts were ignored or misinterpreted, typically resulting in indefinite waits. This resulted from an internal timer overflow that occurred every several hours, and was also manifested as a discontinuity in System.nanoTime() values. The problem would happen if the overflow occurred during blocked timed wait, if additionally a spurious wakeup occurred after the overflow but before timeout in the underlying Object.wait(). This has now been fixed; 1.0_01 users are urged to upgrade to version 1.1. Thanks to Ramesh Nethi for reporting this bug and greatly contributing to tracking it down.
- Feature: backport has been reconciled with JSR 166 CVS repository
on Jan 14, 2005. This results in a handful of new things:
- New time units: MINUTES, HOURS, and DAYS.
- allowCoreThreadTimeOut in ThreadPoolExecutor, which enables bounded pools that kills threads if they are idle for too long.
- ThreadPoolExecutor now handles excessive interruption requests more gracefully (previously, it was reported to be able to crash older JVMs).
- Deques.
- Javadoc improvements.
- Feature: development source bundle with ant scripts allowing to build and test the distribution is now available for download.
- Feature: emulation of UncaughtExceptionHandler, in class ThreadHelpers.
- Documentation: improved, more consistent and accurate javadoc.
- Bugfix: NoClassDefFoundError when using nanoTime() on Java prior to 1.4.2. Thanks to Gabriel Wolosin for reporting this bug.
- Bugfix: deadlocks in ConcurrentLinkedQueue when drainTo() or clear() was invoked when there was blocked put(). Thanks to Jean Morissette for reporting this bug.
- Bugfix: minor glitch in Utils.nanoTime() would cause timer to lose accuracy, about 1ns every 11 days, if JVM was running continuously. (Note: as it turned out, the fix itself had a bug; see the log for version 1.1)
- Initial revision