Also I think I may have figured out why it's taking the Gemei so long to exit. I originally thought it was the sound thread - but it appears to be right at the very end literally on "exit".
The Gemei seems to spend a fair amount of time looking at the filesystem which it changes. Mame4all is always updating config files so it could be that writing out anything is causing these slow downs. I will confirm this today.
Yep I can confirm that this is the issue. When writing nothing to the filesystem, MAME4ALL exits very quickly.
I will add an option to the frontend menu - if selected MAME4ALL will not write out anything to the filesystem.
So what does MAME4ALL usually write out?
config, hi scores, screen snap shots, memcard saves, etc.
Mind you you probably want MAME4ALL to write out config files the first time you run any game; set up the options and controls, etc otherwise it will keep using defaults.
The frontend also writes out frontend config (including the last game played).
If these don't change then it doesn't write anything.
However I will make it that frontend option also applies to these config files.