[Mono-bugs] [Bug 649426] New: Async.Sleep(1) in F sharp consumes 100% of CPU

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 26 18:03:50 EDT 2010



           Summary: Async.Sleep(1) in F sharp consumes 100% of CPU
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: igor at xambala.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b6) Gecko/20100101

Calling Async.Sleep(1) in a loop consumes 100% of CPU. Running on Windows does
not produce the same result
Async.Sleep(2) is almost ok, but occasionally spikes into low 10%s

here's the source:


open System
open System.IO

let main (args : string[]) =

    let fileread =
        async {

                while true do
                    do! Async.Sleep(0)
     |> Async.RunSynchronously


Reproducible: Always

Steps to Reproduce:
Compile the attached source, run it.
Run top. Observe.
Actual Results:  
100% CPU consumption

Expected Results:  
0%, as observed on Windows

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list