• Post Reply Bookmark Topic Watch Topic
  • New Topic

multithreading issue

 
bikibiku chou
Greenhorn
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 method....it 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!