Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Mutliple thread access to object method

Reply
Thread Tools

Mutliple thread access to object method

 
 
Crouchez
Guest
Posts: n/a
 
      08-30-2007
Can multiple threads access the same object public void method
simultaneously? Or does the method need to return for each thread? I guess
not because that's what public synchronized void is for?


 
Reply With Quote
 
 
 
 
Manish Pandit
Guest
Posts: n/a
 
      08-30-2007
On Aug 30, 10:59 am, "Crouchez"
<(E-Mail Removed)> wrote:
> Can multiple threads access the same object public void method
> simultaneously? Or does the method need to return for each thread? I guess
> not because that's what public synchronized void is for?


Your guess is right - they can access the method concurrently, unless
it is synchronized.

-cheers,
Manish

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      08-30-2007
"Crouchez" wrote:
>> Can multiple threads access the same object public void method
>> simultaneously? Or does the method need to return for each thread? I guess
>> not because that's what public synchronized void is for?


Manish Pandit wrote:
> Your guess is right - they can access the method concurrently, unless
> it is synchronized ...


... on the same monitor.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[nio] Mutliple Messages in ByteBuffer Michael B Allen Java 1 12-13-2004 06:30 AM
mutliple CPUs, threading and JVM 1.4.2 David Java 0 11-03-2004 07:29 PM
mutliple schemas/namespaces - xml validation Dominique XML 3 06-29-2004 06:29 PM
Mutliple Virtual Profiles with local AAA Andy Gray Cisco 7 10-29-2003 02:22 PM
Managing mutliple email accounts Zork Computer Support 0 09-18-2003 11:29 PM



Advertisments