[Mono-bugs] [Bug 679183] New: .NET Incompatibility: Task.WaitAll(new Task[] {}) throws an ArgumentException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Mar 13 10:34:46 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=679183

https://bugzilla.novell.com/show_bug.cgi?id=679183#c0


           Summary: .NET Incompatibility: Task.WaitAll(new Task[] {})
                    throws an ArgumentException
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gandro at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
If System.Threading.Tasks.Task.WaitAll(Task[] tasks) is called with an empty
tasks array it throws an ArgumentException saying "tasks is empty". 

The problem here is an incompatibility with the .NET implementation of
Task.WaitAll(Task[] tasks), which does not throw an Exception if the tasks
array is empty.

Steps to reproduce the problem:
1. Call System.Threading.Tasks.Task.WaitAll(new Task[] {});


Actual Results:
[ Exception(s) occurred : .
[ System.ArgumentException: tasks is empty
Parameter name: tasks
  at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks)
[0x00019] in
/build/src/mono-2.10.1/mcs/class/corlib/System.Threading.Tasks/Task.cs:536 

Expected Results:
The method should just return gracefully without doing anything.

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