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:


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


小k said...

It's cool :)

thank your share

malini ecorp said...

) 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

Forina Mouti said...

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

oracle fusion 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