Unable to Service Request

Unable to Service Request

For the latest headlines and to see what's new, visit the MSDN home page.

Check out the various MSDN Developer Centers where you can find the latest product information, technical resources, and community offerings.

Visit the MSDN Library for the latest technical articles, reference documentation, downloads, and more.
© 2013 Microsoft. All rights reserved.

Answered EventLoopScheduler bug?

  • 2 aprilie 2012 06:02
     
      Are cod

    I think I found a bug in EventLoopScheduler. Here is a unit test which reproduces it:

    using System;
    using System.Threading;
    using NUnit.Framework;
    using System.Reactive.Concurrency;
    
    namespace EventLoopSchedulerTests {
        [TestFixture]
        public class EventLoopSchedulerTests {
    
        [Test]
        public void TestEventLoopScheduler() {
          var scheduler = new EventLoopScheduler();
          scheduler.Schedule(TimeSpan.FromMinutes(1), () => { });
          Thread.Sleep(1000);
          scheduler.Schedule(TimeSpan.FromMinutes(2), () => { });
          Thread.Sleep(1000*60);
        }
      }
    }

    If you run this unit test, one processor core will run on 100% for one minute.

    I looked with Reflector in the code and analysed it and I think the problem is that the ManualResetEvent is not reset if a second action is scheduled after the "current" one.

    Is this a known problem? Is there a workaround? Is it been fixed in 2.0?

Toate mesajele

  • 2 aprilie 2012 23:04
    Proprietar
     
     Răspuns

    Known bug as mentioned in passing in the v2.0 Beta release notes. Will be fixed going forward.


    using (Microsoft.Sql.Cloud.DataProgrammability.Rx) { Signature.Emit("Bart De Smet"); }

Unable to Service Request

Unable to Service Request

For the latest headlines and to see what's new, visit the MSDN home page.

Check out the various MSDN Developer Centers where you can find the latest product information, technical resources, and community offerings.

Visit the MSDN Library for the latest technical articles, reference documentation, downloads, and more.
© 2013 Microsoft. All rights reserved.