2. Add the milk, thyme, bay leaf and cayenne pepper. Increase the heat and bring the milk to a boil.
3. Slowly, whisk the cornmeal into the hot milk. After all the cornmeal has been added, cook 3 to 4 minutes more, stirring constantly.
4. Remove the pot from the heat and slowly stir in the grated cheese. Generously season the polenta with salt and pepper.
For the mushrooms:
1. Preheat the oven to 350°F.
2. Carefully remove the stems from the mushrooms. Arrange the mushroom caps on a nonstick baking sheet with the tops up. (Reserve the stems for another use.) Brush the top of the mushroom caps with olive oil and sprinkle them with salt.
3. Cook the mushrooms in the oven until they are thoroughly cooked, about 10 to 15 minutes for small mushrooms.
4. Turn the mushrooms over and season the insides with salt and pepper. Fill the caps with polenta. Break each walnut half into two pieces and place a walnut piece on top of each stuffed mushroom.
(This can be made ahead of time and stored in the refrigerator for up to 2 days.)
5. Heat the stuffed mushrooms in the oven for 8 to 10 minutes before serving, longer if the stuffed mushrooms are cold from the refrigerator.
6. Serve warm on small plates.