Monday, March 31, 2008

Groovy Threads

I don't know why I think this is so cool, because it's such a no-brainer, but I really like the way Groovy added closures to the Thread class:

tmp.groovy:

def stringOne = 'Hello, ';
def stringTwo = 'World!';
Thread.start{sleep(1000); println stringTwo}
Thread.start{sleep(999); print stringOne}

10 comments:

蛋泥。等你。 said...

It's cool :)

thank your share

geetha said...

) Ecorptrainings.com provides GROOVY in hyderabad with best faculties on real time projects. We give the best online trainingamong the GROOVY in Hyderabad. Classroom Training in Hyderabad India

Unknown said...

"I am really impressed with your writing skills and also with the layout on your blog. "
ecorp trainings

Unknown said...

Nice Blog to read and share Thanks for posting. Post as many blogs…............ Visit this site belongs to Oracle Fusion Training get more details from bellow site.

Oracle Fusion Training Institute

Oracle Fusion said...

This is very informative and interesting for those who are interested in blogging field. Commenting on a blog is an art. Good comments create relations. You’re doing great work.
Oracle Fusion HCM Technical Training

Rajesh said...

It is amazing and wonderful to visit your site. Thanks for sharing this information, this is useful to me.
Oracle Fusion SCM Training in Hyderabad

Sannihitha Technologies said...

Thanks for sharing this valuable information to our vision.
You have posted a trust worthy blog keep sharing.
webdesigning course in hyderabad

Rainbow Training Institute said...

Thank you for sharing your awesome and valuable article this is the best blog for the students they can also learn.

Workday Online Training

Rainbow Training Institute said...

Thank you for sharing such a nice and interesting blog.

Workday Online Training

Rainbow Training Institute said...

I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.

Workday HCM Online Training