Dice the ham. Peel and finely dice the onion. Wash and finely chop the parsley. Peel and crush the garlic with a garlic press. Place all of these ingredients near the stove so that they are close at hand and ready to be added to the pan.
Put the egg yolks in a mixing bowl and pour in the cream. Add about a teaspoon of salt and sprinkle with freshly ground black pepper. Mix thoroughly and set aside.
Take a deep sauté frying pan and pour in some olive oil. Add the onion and fry until golden brown. Add the ham and fry together with the onion. Add the parsley and half of the garlic. Stir and heat through. Then lower the heat. Pour in the cream mixture over medium heat. Stir immediately, making sure that the egg yolks do not curdle.
Stir until it thickens. Add the remaining garlic. When it is thick enough, it is ready.
Cook durum spaghetti in salted water.