• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are mutex threads

 
ramya narayanan
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Do we have anything like mutex threads in java.
If yes what for it is used & can someone brief about it.
Regards.
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a threading question and is probably better in the Threads forum. I'm sure a bartender will move it there for us.


Mutex is short for Mutual Exclusion. You can read more about them in the Mutual Exclusion wikipedia article. To the best of my knowledge, Java does not have Mutexes directly, but it does have Intrinsic Locks via the synchronized keyword, which act like Mutexes. Java also has Semaphores which are similar to Mutexes. The Semaphore Wikipedia article discusses the differences between a Mutex and a Sephamore.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49865
71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I have been too busy to notice the suggestion I move the thread. Now it's off to the threads forum.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 1.5 has a concurrency APIs used for managing mutually exclusive locks and code execution. See the Concurrency Tutorial for more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic