Volvo 240 “Dieseling” was a common problem, which were carb engines. It can be caused by:
1. Incorrect timing.
2. A carburetor that does not close entirely can contribute to running once the engine is off, since the extra fuel and oxygen mixture can combust easily in the warm piston chamber.
3. An improperly rated spark plug can retain heat and cause the problem.
4. An engine that runs too hot or too lean may produce an environment conducive to allowing unspent fuel to combust.
5. An idle speed that is too fast can leave the engine with too much angular momentum upon shutdown, raising the chances that the engine can turn over and combust more fuel and lock itself into a cycle of continuous running.
6. Hot vaporized oil gases from the engine crankcase can provide ample fuel for dieseling.
7. Built-up carbon in the ignition chamber can glow red after the engine is switched off, providing a mechanism for sparking unburnt fuel. This can happen when the engine runs very rich, depositing unspent fuel and particles on the pistons and valves.
In my experience, the most common causes are 1; 2; 3; 4 and 5.