Brown mushrooms. Heat 1/4 cup of the oil over medium-high heat in a large stock pot or Dutch oven. Add mushrooms and stir to coat in oil. Let cook, stirring occasionally, until golden, about 10 minutes. Season with salt and pepper and remove to a bowl.
Sauté vegetables. Heat remaining 1/4 cup of oil in the same pot over medium-high heat. Add leeks, garlic, and carrots and season generously with 1/2 teaspoon salt and pepper. Cook, stirring occasionally, until vegetables are browned, about 10 minutes. Add sherry or madeira and scrape up any browned bits that have stuck to the bottom of the pot.
Simmer. Return mushrooms to the pot and add the thyme, barley, and broth and bring to a boil. Reduce heat to a low simmer, cover and cook until barley is tender, about 30 minutes. Taste and add more salt and pepper as needed (I add about 1 tablespoon more salt). Remove thyme stems before serving. Ladle into bowls and serve with lemon wedges for squeezing over the soup.