[concurrency-interest] Language extensions for java.util.concurrent?

Gregg Wonderly gregg at cytetech.com
Thu Nov 10 18:43:18 EST 2005

Elias Ross wrote:
> Too bad Java doesn't have the C# keyword "using", it would be nice to be
> able to write
>      void around() {
>         using (rt) {
>           proceed();
>         }
>      }

A keyword there would be nice.  But, adding keywords to a language is very hard. 
  I think that about the only choice would be to make it possible for 
annotations to be placed in to code.  Then we'd have a whole new dictionary of 
keywords that we could play with because they'd not conflict with identifier useage.

	void around() {
		@locked( rt ) {

this would also allow for @trylocked etc.

Gregg Wonderly

More information about the Concurrency-interest mailing list