public
class
Downloader
implements
Runnable
{
volatile
boolean
finished
=
false
;
public
void
stopMe
(
)
{
finished
=
true
;
}
public
void
run
(
)
{
while
(
!
finished
)
{
System
.
out
.
println
(
"things"
)
;
}
System
.
out
.
println
(
"Done."
)
;
}
}