GitHub user artnaseef opened a pull request:
https://github.com/apache/commons-lang/pull/46
Remove busy wait
Remove the busy wait from AtomicSafeInitializer.get().
Also ensure waiting threads do not wait indefinitely after initialize()
throws an exception, instead throwing the same exception, re-wrapped, for each
requester.
Brought the unit tests up to 100% coverage on AtomicSafeInitializer.
Eliminated race condition on verifying at least one thread waiting for
initialize() to complete in another thread.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/artnaseef/commons-lang removeBusyWait
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/46.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #46
----
commit 2636258c9304e3a346a3a215bf923c462ffb05e0
Author: artnaseef <[email protected]>
Date: 2015-02-19T16:58:21Z
- Remove the busy waits in AtomicSafeInitializer
- Avoid stranded callers when initialize throws an exception
- Add tests for exception handling
- Add a more reliable test for concurrent threads with one thread waiting
on another to finish the initialize call
commit 970498309a6ff3afee1a6749bbb951d00bcdd5bc
Author: artnaseef <[email protected]>
Date: 2015-02-19T18:24:18Z
- Add a useful message on throwing the wrapped InterruptedException
- Restore the old import style for static imports
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]