0

I have a queue of size n on whose every item I am performing a async func simultaneously on n items, whenever one of func(item) is complete I enqueue an element to queue, now i need a signal for this enqueuing,

Is there any way to get callback from a async func which is part of API,

foreach item in queue
{
   //do async function Task<string>
}
 when queue finished one async call
    add more item in queue

there is no callback to check if func is complete.

Timon Post
  • 2,779
  • 1
  • 17
  • 32
murmansk
  • 845
  • 2
  • 11
  • 28
  • You may need to elaborate more on this. Do you have any more you can provide of any code you have written to better explain what you are attempting to do? – gmiley May 19 '17 at 10:39
  • Possible duplicate of [Using async/await for multiple tasks](http://stackoverflow.com/questions/12337671/using-async-await-for-multiple-tasks) – apocalypse May 19 '17 at 10:41
  • When do you need the signal? When the queue is full? When there is an item that is enqueued? – Glubus May 19 '17 at 11:09
  • @Glubus when async function is complete on any on queue member – murmansk May 19 '17 at 11:30
  • Can you provide the code that starts the parallel execution? – Glubus May 19 '17 at 11:33

0 Answers0