If using uncooked bacon heat a tablespoon of oil in a large frying pan over a medium heat. Add the bacon and cook for 2-3 minutes. Add the mushrooms, thyme leaves and garlic. Sauté for 5-6 minutes until the mushrooms are golden.
Meanwhile cook the pasta as per packet instructions. While the pasta is cooking mix together the egg yolks, cream and cheese.
Drain the pasta, reserving about 120ml of the liquid. With the saucepan off the heat, return the pasta to it along with the reserved water, bacon/cooked ham and egg, cream and cheese mixture. Return to a very low heat and stir constantly for a minute or two until the sauce thickens. Taste and season.
Divide between four bowls and sprinkle over some thyme leaves and more cheese if you wish.