Skip to content

Commit

Permalink
Return correctly-sized ProcessThreadCollection to enable Threads.Count.
Browse files Browse the repository at this point in the history
  • Loading branch information
sblom committed Jul 29, 2012
1 parent f733665 commit ef6313d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mcs/class/System/System.Diagnostics/Process.cs
Expand Up @@ -685,11 +685,13 @@ void StartExitCallbackIfNeeded ()
}

[MonoTODO]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden), Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
[MonitoringDescription ("The number of threads of this process.")]
public ProcessThreadCollection Threads {
get {
return ProcessThreadCollection.GetEmpty ();
// This'll return a correctly-sized array of empty ProcessThreads for now.
int error;
return new ProcessThreadCollection(new ProcessThread[GetProcessData (pid, 0, out error)]);
}
}

Expand Down

0 comments on commit ef6313d

Please sign in to comment.