Halve the onion and slice the halves thinly. Clean the mushrooms and slice them thinly as well. Crush or grate the garlic.
If using the same skillet to cook the sauce, transfer the chicken to another dish and keep it warm. Caution: the skillet is very hot, handle it with care.
If using a clean non-stick pan or skillet, heat it up and melt the additional butter.
Cook the onions, mushrooms, and garlic for about 5 minutes or until nicely golden. Season with salt, pepper, dried thyme, and crushed chili flakes, if using.
Sprinkle the flour all over the mushrooms and stir well for about 1 minute, the mushrooms should be coated in flour.
Slowly start adding the milk, cream, and chicken stock while whisking all the time to avoid the formation of clumps. Season the sauce with salt and pepper.
Simmer the mushrooms sauce on low heat for about 2 minutes while stirring constantly.
Add the freshly grated Parmesan and stir for another minute or until the sauce thickens slightly.
If the sauce is too thick, stir in a little more milk or chicken stock to achieve the desired consistency.
Nestle the chicken thighs into the sauce, sprinkle the dish with some chopped parsley, and serve immediately as suggested above.