Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix race in MapParallelOrderedObservable #906
Consider the following scenario:
This can likely happen especially for small tasks (such tasks are not suitable for this operator in the first place, though). For example, I can reproduce it with the following simple observable:
Observable .range(1, 10000000) .mapParallelOrdered(10)(Task(_)) .dump("O")
This patch will ensure that the polling of the queue is done as many as the number of elements.
I'm not sure but #846 may have made the problem more likely.