Paralell execution in threads from gant (with calling ant targets)

By admin, written on June 2, 2010

gant   snippet

  • Join date: 11-30-99
  • Posts: 52
View Counter:
  • 54 views
Rate it
Ad
Poll
  • Who manages CI environment in your enterprise?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
final randomWait = { id, time ->
  ant.echo (message : "Thread $id is sleeping for $time")
  for (int i in 0..5) {
    sleep time
    ant.echo (message : "Thread $id woke up" )
  }
  ant.echo (message : "Thread $id is done")
}
 
target ( default: ''  ) {
    for (int i in 10..1) {
      Thread.start {  
        randomWait(i, i*20)
      }
      sleep 20
    }
 
    sleep 2000
}
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'
TAGS
No tags for this post.
RELATED
Pages
Posts
SOCIAL
Be Sociable, Share!

Leave a Reply