move kitchen-sink demo into a separate directory

This commit is contained in:
Fabian Jakobs 2011-10-13 11:22:19 +02:00
commit 606963f424
39 changed files with 47 additions and 49 deletions

View file

@ -1,26 +0,0 @@
//http://groovy.codehaus.org/Concurrency+with+Groovy
import java.util.concurrent.atomic.AtomicInteger
def counter = new AtomicInteger()
synchronized out(message) {
println(message)
}
def th = Thread.start {
for( i in 1..8 ) {
sleep 30
out "thread loop $i"
counter.incrementAndGet()
}
}
for( j in 1..4 ) {
sleep 50
out "main loop $j"
counter.incrementAndGet()
}
th.join()
assert counter.get() == 12