aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/share_lock_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Test the happy path for recursive yields tooMatthew Draper2016-02-081-0/+35
|
* Fix a nonsensical ShareLock test.thedarkone2016-02-071-22/+21
|
* AS::Conc::ShareLock#yield_shares tests.thedarkone2016-02-071-0/+107
|
* Hand off the interlock to the new thread in AC::LiveMatthew Draper2016-02-071-0/+26
| | | | | | Most importantly, the original request thread must yield its share lock while waiting for the live thread to commit -- otherwise a request's base and live threads can deadlock against each other.
* After completing a load, give other threads a chance tooMatthew Draper2016-02-021-0/+17
| | | | | | | | | While we know no user code is running, we should do as much loading as we can. That way, all the threads will then be able to resume running user code together. Otherwise, only the last arriving thread would get to do its load, and would then return to userspace, leaving the others still blocked.
* While new sharers are blocked, an existing sharer remains re-entrantMatthew Draper2016-02-021-0/+29
|
* Block new share attempts if there's an exclusive waiterMatthew Draper2016-02-021-0/+32
|
* Require only necessary concurrent-ruby classes.Jerry D'Antonio2015-11-041-1/+1
|
* Small tweaks to mainly lock-ordering tests.thedarkone2015-07-221-21/+58
| | | | | | * only test the upgrade path, * add test to verify non upgrades can’t preempt, * add reentrancy assertion.
* Handle thread death during lock acquisitionMatthew Draper2015-07-211-0/+21
| | | | | | Specifically, clean up if the thread is killed while it's blocked awaiting the lock... if we get killed on some other arbitrary line, the result remains quite undefined.
* Adjust expectations around purpose/compatibility optionsMatthew Draper2015-07-211-8/+35
|
* Add some meta-assertions for the custom assertionsMatthew Draper2015-07-211-11/+63
| | | | | | I accidentally discovered `assert_threads_not_stuck` couldn't fail, so the simplest solution was to prove they're all now working in both directions.
* Order of execution is only guaranteed if upgradingMatthew Draper2015-07-211-1/+3
| | | | | If the thread isn't yet holding any form of lock, it has no claim over what may / may not run while it's blocked.
* Tests for AS::Concurrency::ShareLock.thedarkone2015-07-201-0/+194