In a skillet over medium heat, combine red wine, onion, garlic, and thyme. Bring to a boil, and cook until volume is reduced by about 1/4. Set aside, and allow to cool.
Melt butter in a skillet over medium heat until just beginning to brown. Add beef, and cook until evenly brown. Remove beef, and stir into cooled wine mixture. Set aside while preparing sauce.
Sprinkle flour into skillet. Reduce heat, and cook slowly until flour is browned. Gradually stir in beef stock, and stir until mixture comes to a boil. Season with salt and pepper, and simmer uncovered for about 10 minutes.
Stir in beef and wine mixture. Cover, and cook very gently for 40 to 45 minutes. Lay mushrooms on top of beef. Cover, and simmer for about 10 more minutes. Transfer beef and mushrooms to a serving dish. Taste sauce, and adjust seasonings. Simmer until sauce has reduced to desired consistency, then pour over meat.