Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2015 at 11:04 UTC
Updated:
17 Feb 2016 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerIn fact that example at the moment is no longer true, because we don't rebuild the routing information on access, but just always on write. Another good example could be the container being compiled and written to cache.
Comment #3
roderikGood point. But I'm not seeing any use of the LockBackendInterface in the container compiling code. That's around \Drupal\Core\DrupalKernel::initializeContainer(), right?
Looking through the uses of acquire in core, I'm not sure of all of them but
As far as I'm seeing this leaves only the obvious usage in Cron::run(). Which is not a comcrete example. So I included a cron invocation as an example. For your review/opinion.
Comment #4
jhodgdonThat looks fairly reasonable to me.... I am not sure that we need to be so specific about aggregator_cron() though, and I had to read the paragraph a few times before I figured out how it all fit together (not a sign of wonderfully perfect documentation, although I did eventually figure it out).
Maybe it would be clearer if we just said something like:
For instance, some implementations of hook_cron() implicitly assume they are running only once, rather than having multiple calls in parallel. To prevent problems with such code, the cron system uses a locking process to ensure that cron is not started again if it is already running.
Comment #5
roderikYou're right, that's much better. More readable, doesn't twist your mind into trying to figure out the specific example... and specifics aren't necessary really.
Patch contains your suggestion as is. That's an implicit RTBC :)
Comment #6
jhodgdonLooks good, thanks! I will take the liberty of RTBC-ing the patch, and you RTBC-d the wording, so that is probably enough reviewing. :)
Comment #7
jhodgdonChanging this back to 8.0 because this is docs and should be changed in both 8.0 and 8.1.
Comment #8
catchCommitted/pushed to 8.1.x and cherry-picked to 8.0.x. Thanks!