Friday, 6 September 2013

Why calling Join() in CurrentThread doesn't throw exception?

Why calling Join() in CurrentThread doesn't throw exception?

Few hours ago while I was answering one question in SO I just tried the
following snippet
Thread.CurrentThread.Join();//why this is legal?
Does this makes any sense? Definitely no.
Then why does .net framework doesn't throw exception in such scenario? Do
they forgot? I don't think they do.
Note:Pls don't fire duplicate flags pointing another question in SO asking
Thread.CurrentThread.Join(); makes any sense? My question is different.

No comments:

Post a Comment