Reactive Extensions Parallel processing based on specific number

שאלה Reactive Extensions Parallel processing based on specific number

  • יום שני 16 אפריל 2012 18:46
     
     

    '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.

כל התגובות

  • יום שלישי 17 אפריל 2012 11:45
     
     

    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".

  • יום רביעי 18 אפריל 2012 12:55
     
     

    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