none
How to define a universal concurrency limit

    Question

  • Hi,

    I am using ReactiveUI by Paul Betts, I am using the following code for each Grid cell

    DoUpdate.Throttle(throttle, RxApp.MainThreadScheduler).Select(x =>
                {
                    return Observable.Return("Calculating...").Concat(Observable.Start(() =>
                    {
                        Thread.Sleep(2000);
                        return CalculatePropValue().ToString();
                    }, RxApp.MainThreadScheduler));
                }).Switch().ToProperty(this, x => x.PropName, out _propName);
    DoUpdate is a ReactiveCommand.

    The problem is, when the code runs, even before the command is Execute()ed . A thread is created and put into Wait() state for each call mentioned above....

    How can I get this to use a thread pool and not create so many threads ?


    Fahad

    Saturday, September 07, 2013 9:07 PM

All replies

  • I suggest that this post is more appropriate for the ReactiveUI mailing list

    Lee Campbell http://LeeCampbell.blogspot.com


    • Edited by LeeCampbell Sunday, September 08, 2013 9:50 PM
    Sunday, September 08, 2013 9:49 PM