Curious TFile/TTree behavior


I have a script which loops over about 2M events in a TChain a few times. It prints out the event number every 10k events. It takes a while to complete, so I modify it and run it again along with the first one.

I am trying to understand what happens next…

Even though the first script is started way before the second, they seem to synchronize. That is, one seems to slow down until the the other one catches up to the same event number and then they proceed in sync (at a good rate).

Is this something built into TFile, TTree, or TChain? This is not a problem and it appears to be a desired behavior, but I am curious about what could be causing it.
Are they sharing some memory or something else?

Thanks in advance.