Reactive Extensions Parallel processing based on specific number
-
Monday, April 16, 2012 6:46 PM
'm new to Reactive Extensions. I have objects collection and call a method for each object and method returns Boolean. Instead of looping through each by using for each loop and calling the method, is there a way in reactive extensions to call concurrently(fork and join) the method for a given number of objects(ex 5 at a time) and after first one done, 6th one should call method and it should continue until all the objects are done.
I appreciate your response.
- Moved by Mike FengMicrosoft Contingent Staff Wednesday, April 18, 2012 8:07 AM (From:.NET Base Class Library)
All Replies
-
Tuesday, April 17, 2012 11:45 AM
Hi,
RX related questions can be well addressed from following forum
http://social.msdn.microsoft.com/Forums/en-US/rx/threads
If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
-
Wednesday, April 18, 2012 12:55 PM
Hi,
If you could post some code it may be helpful. But from your description alone, it sounds like PLINQ may be appropriate. You could of course use Rx to do this as well though, but PLINQ is perhaps more natural for writing a parallelized query starting from IEnumerable<T>.
- Dave
http://davesexton.com/blog

