• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stall when reading variable

 
Brian Duncan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm currently having an issue with an Piped input/output situation. The program is stalling everytime it get so the .read() and is not getting to the finished read statment. I could use some help explaining why this is the case. Here is the code:



[ June 29, 2006: Message edited by: Brian Duncan ]
[ June 29, 2006: Message edited by: Brian Duncan ]
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the doc: Typically, data is read from a PipedInputStream object by one thread and data is written to the corresponding PipedOutputStream by some other thread. Attempting to use both objects from a single thread is not recommended, as it may deadlock the thread. If you're not comfortable with threads, the threading forum is just a line or two away on the forum menu.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!