[Biojava-l] BLAST from Java

Colin Hardman colin.hardman@cambridgeAntibody.com
Wed, 20 Feb 2002 08:51:29 +0000


Thomas Down wrote

> I'm not a Windows user.  But one thing which occurs to
> me: you're handling the output of the process on the same
> thread as the Process itself.  I always use separate threads
> (I don't know if this is the `official' way of doing things,
> but it's a pragmatic approach which always seems to be reliable):

I believe this is because some programs/systems will block if the output and/or
error streams are not being read, so if you are waiting for it to finish before
reading the stream and they are waiting for you to read the stream before
finishing... you have deadlock. So threads are definately a good idea.

There's a javaworld article that covers some windows specific problems
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html that you might
find useful.

Colin