[vox-tech] Java Threads: Abort not found...

Mike Simons vox-tech@lists.lugod.org
Fri, 18 Apr 2003 18:44:45 -0400


--7CZp05NP8/gJM8Cl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 18, 2003 at 02:32:15PM -0700, Ken Herron wrote:
> When you're developing for unix, [...]

  Excellent post Ken.

> Threads have a reputation for being difficult to work with. It's true=20
> there's a bit of a learning curve, but personally I've never had much=20
> trouble with them. They're definitely the wave of the future; java=20
> contains sophisticated thread support, and most complex GUI-driven=20
> programs are multithreaded. If you aspire to do serious programming=20
> you'll probably end up learning them anyway; better to do it now before=
=20
> you develop a lot of bad programming habits.

  All true.
 =20
  I'm irritated about Java preventing one thread of forcefully stopping=20
another thread... If you start a child thread that makes a blocking call
into something, there doesn't appear to be a way for the parent thread=20
to decide the child has taken too long and forcefully abort the child=20
thread, or even get it to return from that blocked call.

  In all Java code I've seen that handles this situation the parent
just ignores the stuck child and continues along while the child is
left in limbo land if it ever returns the result will be ignored...
eventually the Java process exhausts resources on all the stuck
children threads.

  If anyone knows of a way for one Java thread to forcefully stop another
from stopping, let me know...

    TTFN,
      Mike

--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

--7CZp05NP8/gJM8Cl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+oH/d4Qwkn7f6rL4RAtyoAJ9ZC4vYvaeWZ6NRncq6/ET9h7IMugCbBbf+
7/9Tky6HQcSoVKxlzsgXSvw=
=P7uU
-----END PGP SIGNATURE-----

--7CZp05NP8/gJM8Cl--