Cook the spaghetti according to the package directions. Meanwhile, heat oil over medium-high in a large skillet or saucepan. Sauté the sliced mushrooms until golden and tender, about 10 minutes.
Add the leeks, garlic, thyme, salt, and pepper; cook about 3 to 4 minutes until the leeks are tender. Add the chicken broth; cook 30 seconds. Stir together the yogurt and flour; add to the skillet and cook just until bubbly. Serve the mushroom mixture over the cooked spaghetti. Top with Parmesan cheese.