Multi Threading
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, September 21, 2004 10:50 PM

A class contains two synchronized methods meth1(),meth2(),

can Thread2 access the meth2() while Thread1 is processing meth1() of the same object?if yes how to access ? pls give sample code.

Re: Multi Threading

Posted By:   Anand_Rajasekar  
Posted On:   Thursday, September 30, 2004 12:33 PM

synchorized methods lock on the object, so it the answer is no, thread1 would have locked the object and thread 2 would wait till thread one exits method1
About | Sitemap | Contact