This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how class make singleThreaded?

 
Sukhadev Patil
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how i make a class singleThreaded and FIFO type?
 
mohit bahl
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Sukhadev

Please do not multiple posts for the same question and if you have something to else to ask then you can ask the same in the thread that you started.

cheers!
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15208
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Properties like single or multithreaded and FIFO or not are not properties of a class.

Your question does not make sense.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Describe your need a bit. Making a class single threaded is not common language in Java, so I'm not sure what you're up to.

If you want to make sure that only one thread is executing methods on a given object instance, make all the methods synchronized.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic