projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mono
/
tests
/
finally_block_ending_in_dead_bb.cs
1
using System;
2
using System.Threading;
3
4
class Driver {
5
static volatile bool foo = false;
6
static int res = 1;
7
8
static void Stuff () {
9
res = 2;
10
try {
11
res = 3;
12
} finally {
13
res = 4;
14
while (!foo);
15
Thread.ResetAbort ();
16
res = 0;
17
}
18
}
19
20
static int Main () {
21
Thread t = new Thread (Stuff);
22
t.Start ();
23
Thread.Sleep (100);
24
t.Abort ();
25
foo = true;
26
t.Join ();
27
Thread.Sleep (500);
28
if (res != 0)
29
Console.WriteLine ("Could not abort thread final state {0}", res);
30
return res;
31
}
32
}