aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/share_lock_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin blockRyuta Kamizono2018-12-211-52/+50
| | | | | | | | | | Currently we sometimes find a redundant begin block in code review (e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205). I'd like to enable `Style/RedundantBegin` cop to avoid that, since rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5 (https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with that situation than before.
* Change the empty block style to have space inside of the blockRafael Mendonça França2018-09-251-27/+27
|
* [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveSupportKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-62/+62
|
* applies new string literal convention in activesupport/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* 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