Find the answer to your Linux question:
Results 1 to 2 of 2
what I mean is, I create two thread in a program, ----------------------------------------------------------------------------------------------- A.start(); B.start(); ----------------------------------------------------------------------------------------------- class A is used to monitor user's behaviour, and class B is used to do ...
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    60

    Can one thread affect another thread in JAVA?

    what I mean is, I create two thread in a program,
    -----------------------------------------------------------------------------------------------
    A.start();
    B.start();
    -----------------------------------------------------------------------------------------------

    class A is used to monitor user's behaviour, and class B is used to do sth else. But I want A to stop B's running if user input a specific word.

    So what can I do?

    Thanks in advance.

  2. #2
    Linux User tech_man's Avatar
    Join Date
    Jan 2007
    Location
    USA
    Posts
    385
    Use interrupt?
    'Tis better to be silent and be thought a fool, than to speak and remove all doubt.'
    --Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...