gROOT.CloseFiles() : long wait

I encountered similar-sounding hangs in one of my programs. The solution was to manually .Close() the TFiles. I kept a python dictionary or list of all my TFile handles so it was quite easy to do:

[f.Close() for f in myfiles]

My original post about it is here: [url]Python doesn't exit after main function

Jean-François