xwiki/xwiki-commons — comment on commit 724f2011a49c2fc49daed4846adb1e7c76eff5b2
File: xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/embed/EmbeddableComponentManager.java line 163
By vmassol:

I'm not entirely sure about this one. I think the reason for the whole block to be in a synchronized block on this is to prevent modifications when the method is executing. Otherwise you may start and then some componententries may be removed or added while iterating (and same for parents). So for example we could return a given component instance that is no longer available because it's been removed in the meantime (or new instances registered and added). This wasn't the case before since we were sure it existed when it was returned.

It's similar to database transaction isolation level.