1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

11 commits

Author SHA1 Message Date
Matthew Draper
aeb58ab704 Block new share attempts if there's an exclusive waiter 2016-02-02 03:21:03 +10:30
Jerry D'Antonio
23b6f65fd1 Require only necessary concurrent-ruby classes. 2015-11-04 21:12:28 -05:00
Matthew Draper
e9020ac431 Handle thread death during lock acquisition
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.
2015-07-21 12:03:38 +09:30
Matthew Draper
4c54b2a9a0 Adjust expectations around purpose/compatibility options 2015-07-21 12:03:38 +09:30
Matthew Draper
649d8173c3 Order of execution is only guaranteed if upgrading
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.
2015-07-21 08:50:50 +09:30
thedarkone
b3d78e8c23 Fix ShareLock issues. 2015-07-20 19:01:15 +02:00
Matthew Draper
bd31aec9c3 We need stricter locking before we can unload
Specifically, the "loose upgrades" behaviour that allows us to obtain an
exclusive right to load things while other requests are in progress (but
waiting on the exclusive lock for themselves) prevents us from treating
load & unload interchangeably: new things appearing is fine, but they do
*not* expect previously-present constants to vanish.

We can still use loose upgrades for unloading -- once someone has
decided to unload, they don't really care if someone else gets there
first -- it just needs to be tracked separately.
2015-07-20 09:14:10 +09:30
Jerry D'Antonio
284a9ba8ec Replaced ActiveSupport::Concurrency::Latch with concurrent-ruby.
The concurrent-ruby gem is a toolset containing many concurrency
utilities. Many of these utilities include runtime-specific
optimizations when possible. Rather than clutter the Rails codebase with
concurrency utilities separate from the core task, such tools can be
superseded by similar tools in the more specialized gem. This commit
replaces `ActiveSupport::Concurrency::Latch` with
`Concurrent::CountDownLatch`, which is functionally equivalent.
2015-07-13 15:44:21 -04:00
Matthew Draper
0b93c48bbe Document ShareLock and the Interlock 2015-07-09 04:33:14 +09:30
Matthew Draper
c37d47e308 Soften the lock requirements when eager_load is disabled
We don't need to fully disable concurrent requests: just ensure that
loads are performed in isolation.
2015-07-09 02:23:23 +09:30
Aaron Patterson
af0a9f9eef added live responses which can be written and read in separate threads 2012-07-29 21:43:05 -07:00