471,570 Members | 932 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,570 software developers and data experts.

exception inside lock before lock body

exception inside lock before lock body

lock(foo()){bar();} what will happen if foo() throws an exception? will
there be a lock on the exception?
Dec 9 '05 #1
2 1829
KJ
No. AFAIK, an exception is not a returned object from foo().

Dec 9 '05 #2
Daniel <so*******************@yahoo.com> wrote:
exception inside lock before lock body

lock(foo()){bar();} what will happen if foo() throws an exception? will
there be a lock on the exception?


Please don't multi-post like this - you've had the same answer from
three different people now, on three different groups. If you'd only
posted on one group, you (probably) wouldn't have had people answering
you when there was already an answer.

See http://www.pobox.com/~skeet/csharp/faq/posting.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dec 9 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Richard Lewis | last post: by
2 posts views Thread by Daniel | last post: by
6 posts views Thread by semedao | last post: by
6 posts views Thread by Wilfried Mestdagh | last post: by
3 posts views Thread by Tomsawyer2kin_hotmail | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.