I'm writing a tool that sends queries to an azure table, the amount of queries depends on the user. I want to send queries in parallel but only up to a given number (I don't want to send all 100 queries at once). Is there any built in mechanism I can use to sent say up to 20 queries in parallel each time?
I know there is Parallel.ForEach which can be limited using ParallelOptions.MaxDegreeOfParallelism, but for asynchronous operation like mine this will just send all the queries really fast and my tool will handle all 100 callbacks at once.