Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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: 15272
37
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