MAME has a -mt option to turn on some extra multithreading to give a tiny speedup by handling the final blit on a different thread. This is unrelated to drivers which have their own threading implementations for larger speedups.
For several versions now this has been the default.
However, it is not a *safe* option to use, and should really be turned off.
The problem appears to be that for games using indexed palette modes the palette / video aren’t buffered properly and end up out of sync in what MAME outputs at a frame, or even sub-frame (if single stepping) level.
This is very evident in some cases, for example in “Rapid Hero” the initial fade at the start of a level becomes a flickering mess with -mt enabled, and in games like “DoDonPachi Dai-Ou-Jou” the area surrounding the AMI logo fades at a different speed to the rest of the image creating an obvious border, in addition the ending text fades are horrible broken. Several CPS2 games including the of the intro screens of “Gigawing” exhibit similar issues with -mt enabled. In other cases it caused more severe palette glitches; I had to work around it in Casanova by converting the whole driver to use RGB32 mode.
The issues introduced can be rather system-specific, and depend on the unchecked timing of everything else in your machine, so depending on what hardware you’re using the glitches may be different for you.
While in some case such glitches occurred on real hardware, and are thus emulated, the -mt option is creating many more incorrect cases where this happens and is significantly harmful to the fidelity of our emulation. I do not know why it is turned on by default for some marginal performance gain on older systems, it seems to go against the MAME philosophy of putting correctness of emulation as the first priority.
There are already Mametesters entries associated with this bug, for example
I’ve requested that it be turned off several times, but it appears the development team are not interested in turning it off, so I feel the need to highlight this issue as a public service. If you want to guarantee MAME operates as expected without additional glitches being introduced based on the hardware configuration of your machine then you should ensure you run with -nomt or equivalent way of turning off the multithreading from your frontend.
UME builds still ship with it turned on because I wish to ship unmodified baseline sources (so this applies equally to that) but it does irritate me that I’m shipping a piece of software with options know to cause defects in the emulation turned on by default.