aspose file tools
The moose likes Threads and Synchronization and the fly likes Reg. Thread basics question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Reg. Thread basics question" Watch "Reg. Thread basics question" New topic
Author

Reg. Thread basics question

Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327

Can someone explain me the lines //1 and //2 and the effect
of creating this threads and calling the run method.
How will they be synchronized ?
Mr. C Lamont Gilbert
Ranch Hand

Joined: Oct 05, 2001
Posts: 1170

Can someone explain me the lines //1 and //2 and the effect
of creating this threads and calling the run method.
How will they be synchronized ?

</BLOCKQUOTE>

Since they are each synchronized with respect to themselves, there will be no visible effect of the synchronization. They are seperete objects synchronized on seperate things.

[This message has been edited by CL Gilbert (edited October 08, 2001).]
[This message has been edited by CL Gilbert (edited October 08, 2001).]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Reg. Thread basics question
 
Similar Threads
join()
tthread doubt
Reg. Some Thread basics
Confuon in Thread Problem
Doubt in Threads Synchronization