I need behaviour like a bingo game. Im observing a sequence of strings from an observable. I select elements from the sequence that are contained in a list. I need my query to finish when all elements in the list have been mentioned once.
The setting is a parallel computing setup. I have a number of worker processes that get assigned small subtasks round robbin through a queue. One "job" consists of several subtasks. When a subtask has completed a message is put on a queue
and taken off as part of the infinite sequence.
I want to make a query that returns (OnCompleted) when all subtasks in a job have been completed.
So far I have something like:
from subtaskid in subtaskidsequence
But it does not complete once all elements in subtaskList have been mentioned on the queue. What do you propose?