repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[System.Runtime.InteropServices.RuntimeInformation] Updated to reference copied files...
[mono-project.git]
/
mono
/
tests
/
finally_block_ending_in_dead_bb.cs
blob
162b8a0f18c6361ac07e577ebdddd7e571cf4787
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
}