When growing herbs we sometimes become obsessed with removing the flowers to encourage bigger and better foliage for culinary use. But sometimes we can compromise.
These purple basil growing in a pot on the patio have been flowering for several weeks now and are superb. The lilac purple flowers contrast so well against the deep purple green foliage. I haven't noticed that the foliage is any less pungent.
So perhaps it is worthwhile allowing some of our herbs to go to flower at the end of the summer.