Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: ee0bc0d176
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (36 sloc) 0.768 kB
//
// This is:
//
// http://bugzilla.ximian.com/show_bug.cgi?id=72740
//
using System;
using System.Threading;
class T {
static int loops = 20;
static int threads = 100;
static void worker () {
// This hits alot of runtime code.
while (true)
typeof (object).Assembly.GetTypes ();
}
static void doit () {
Thread[] ta = new Thread [threads];
for (int i = 0; i < threads; ++i) {
ta [i] = new Thread (new ThreadStart (worker));
ta [i].Start ();
}
for (int i = 0; i < threads; ++i) {
ta [i].Abort ();
}
}
static void Main (string[] args) {
if (args.Length > 0)
loops = int.Parse (args [0]);
if (args.Length > 1)
threads = int.Parse (args [1]);
for (int i = 0; i < loops; ++i) {
Console.Write ('.');
doit ();
}
}
}
Jump to Line
Something went wrong with that request. Please try again.