January 31, 2004 try_synchronized (or equivalent) needed | ||||
---|---|---|---|---|
| ||||
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? |
January 31, 2004 Re: try_synchronized (or equivalent) needed | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russ Lewis | 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. |
Copyright © 1999-2021 by the D Language Foundation