Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

multithreading issue  RSS feed

bikibiku chou
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a single session say I am running 5 threads all r trying to access a method which have used input/output stream.When one thread entered the used the input/output stream and closes it.At same point of time some other thread when trying to execute the method its throwing exception like either input stream is close or inputstream read fully.I overcome the problem by synchronizing the method.My question is how can we implement multithreading without synchronizing the method or using synchronized statement...i mean without synchronizing input/output streams object.Any idea?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!