Re: Make a Blocking call non - blocking
Thursday, April 25, 2002 08:57 AM
I guess your approach would need to take into account why the call was blocking. Generally speaking, interrupting a blocked IO call is not a good idea. After all, they generally block for a good reason. For example, interrupting a blocking IO operation on a database would not be a good idea as it could leave the database in an indeterminate state. This is why using 'interrupt' to interrupt a thread under Solaris is not a good idea because under Solaris, unlike with other OSes, the JVM causes a blocked IO op to generate an InterruptedIOException.