In a large pot over medium-high heat, heat the oil and add the shallots, mushrooms, and thyme. Cook them, stirring frequently, for about 10 minutes, or until they soften and brown. Stir in the flour, and cook for 2 or 3 more minutes, or until it begins to brown.