Bring 2 quarts of water to a boil and add salt.
Slowly whisk the polenta into the water in the top section of the double boiler, whisking in 1 direction to avoid creating lumps. Continue whisking, scraping the bottom and corners of the pot, for 5 minutes. When the polenta begins to thicken, cover it, and fit the top of the double boiler into the bottom part of the double boiler. Cook for 90 minutes, stirring every 30 minutes. Once it is ready, turn it out onto a board.
Once the polenta is ready for serving, heat the olive oil over medium-high heat in a large frying pan, and add the garlic. Cook until it is golden brown, then add the tomato sauce, wine, and red pepper flakes, and cook for 5 minutes. Add the clams, cover the pan, and cook for 5 minutes, until they all open. Uncover and cook for an additional 5 minutes, discard any that do not open. Season with salt and pepper, to taste.
Serve a wedge of polenta on each of 6 heated dinner plates and spoon some of the clam cooking sauce over it. Divide the clams evenly among the plates and season with salt and pepper.
In a 3-quart saucepan, heat the olive oil over medium heat. Add the onion and garlic and cook until soft and light golden brown, about 8 to 10 minutes. Add the thyme and carrot and cook until the carrot is quite soft, about 5 minutes more. Add the tomatoes and their juice and bring to a boil, stirring often. Lower the heat and simmer until as thick as hot cereal, about 30 minutes. Season with salt, to taste.
This sauce holds 1 week in the refrigerator or up to 6 months in the freezer.
Recipe copyright Mario Batali, 2002. All Rights Reserved