D - try_synchronized (or equivalent) needed
- Russ Lewis (8/8) Jan 31 2004 I like that we can do
- yaneurao (3/6) Jan 31 2004 it sounds good. sometimes I also want such syntax for balking.
I like that we can do synchronized(<Object>) statement; But sometimes I want to be able to detect (and avoid) deadlocks, and it would be nice to be able to do that with the same synchronized() syntax. How about this: try_synchronized(<Object>) statement; else statement; (the 'else' runs if you can't immediately grab the lock). Or else, is ther already some way to do this, Walter?
Jan 31 2004
In article <bvgheq$1lbn$1 digitaldaemon.com>, Russ Lewis says...How about this: try_synchronized(<Object>) statement; else statement; (the 'else' runs if you can't immediately grab the lock).it sounds good. sometimes I also want such syntax for balking. yaneurao.
Jan 31 2004