newbie question

Discussion in 'Java' started by Craig Rafferty, Jul 6, 2003.

  1. This has probably got a simple answer but I don't know what it is, any help
    would be appreciated.

    I am trying to create a thread to watch the value of an integer, there will
    be set bounds that this integer must be in(ie >0 and < 50). I require that
    when the value of the integer goes outside of these bounds, the calling
    thread, in this case the main thread, will be notified.

    To explain a little further, I am doing a project where I will use java to
    simulate some sort of controller. My controller will allow taps to be turned
    on to fill a tub and drainage to be activated. I had intended to model a
    depth sensor using a thread to continually provide information on the water
    depth, allowing the main program to control other things, when the maximum
    depth is reached, the thread should interrupt the main program telling it.
    This would save the main program from continually polling the depth sensor.

    Thanks.
    Craig Rafferty, Jul 6, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry C.
    Replies:
    8
    Views:
    207
    Uri Guttman
    Nov 23, 2003
  2. Kruno Saho
    Replies:
    0
    Views:
    125
    Kruno Saho
    Apr 7, 2013
  3. Dave Angel
    Replies:
    0
    Views:
    110
    Dave Angel
    Apr 7, 2013
  4. rusi
    Replies:
    0
    Views:
    100
  5. Miki Tebeka
    Replies:
    0
    Views:
    74
    Miki Tebeka
    Apr 7, 2013
Loading...

Share This Page